Commits
Marek Vsechovsky committed a69a1ee27f8
Session 161, Step 4: Answer Chrome "Free up space" dialog, Aisman storage footprint, and localStorage quota questions
- AIM-3165 Answer Chrome "Free up space" dialog, Aisman storage footprint, and localStorage quota questions
- AIM-3546 Show steps-ago labels in the AI sessions > Session issues table
Outcome:
Implemented both issues:
- **AIM-3165** — note/edit backups now carry a hard 7-day expiration (`BACKUP_MAX_AGE_DAYS`) enforced by the new `AimLS.purgeExpiredBackups()`, which runs together with `ensureBackupHeadroom()` (keeps 512 KB of quota free via `navigator.storage.estimate()`) on the existing 6-hour timer in `dashboard-workflow.js`. Any backup write that fails with `QuotaExceededError` now goes through `_writeItem()`, which evicts expired then oldest backups and retries. This also fixed a pre-existing bug: the purge loops tested `key.indexOf(PRE) !== 0` against raw keys that already carry the user-directory prefix, so they silently skipped every key once a user dir was set.
- **AIM-3167 (new issue -4203)** — the steps-ago label now appears in the "AI sessions" > "Session issues" table with the final design (number only, no minus sign or "S"; shoe-prints icon as a superscript via the existing `.aim-wf-steps-ago::before` CSS). New endpoint `GET /api/sessions/{sessionId}/issue-last-steps` supplies last-processed-step numbers in one grouped query; the client caches them per session, renders the label in `renderSessionStepIssue()`, and click-to-highlight grouping by step works exactly as in Wf S1 (scoped to `#sessionCreatedList`).