# Tasks

Live checklist. `[x]` done, `[ ]` open. Update it as work finishes or is added, and refresh "Next up" so the next agent knows where to start. Open questions are numbered in `DECISIONS.md`.

## Next up (start here)

0. **Capture mode (1.2.0) on the real 200+ closed groups:** update (empty the folder, paste, reload), start Capture mode, open a handful of closed groups and check names, colors, tab counts and titles in DustyTab before doing the rest. Then delete the captured groups in Chrome's menu. Report if any group was missed or tabs stayed open.
1. Austin's 1.1.0 update by copying files over the old folder left a blank page. Fixed in 1.1.1 (start-up guard, version check, clearer steps). Austin re-installs or updates with the new steps on `/dustytab` (empty the folder, paste, reload; never Remove) and confirms the list survived. If it still fails, the "couldn't start" screen's "Copy error details" text says why.
2. Then tries Dusty and the Auto dust preview on his real list.
3. **Transcripts on real YouTube:** run the Transcript lab on three kinds of video (written captions, automatic only, none) and record which routes work, here under Phase 3. Steps are in `TRANSCRIPTS.md`. Nothing about transcripts could be tested against real YouTube in the build environment.
4. Check that placeholder YouTube titles get their real titles (Settings → Videos → "Look up missing lengths and titles now").
5. Get answers to the open questions in `DECISIONS.md` (Q1, Q12 to Q15 matter most now).

## Phase 0 — planning (done)

- [x] Folder, plan, data model, open questions (as "Tabled", v0)

## Phase 1 — v1.0.0 (done)

- [x] Renamed to DustyTab (`tools/public/dustytab/`, `/dustytab`)
- [x] MV3 manifest with a fixed id (`key`), icons 16/32/48/128, Alt+Shift+D and Alt+Shift+L
- [x] Save and close the window; skip pinned, blank and own tabs; write before closing; failure closes nothing
- [x] Toolbar right-click menu: open list, save only this tab, all except this one, all windows, settings; page and link "send to DustyTab"
- [x] Chrome tab group names and colors carried over; same-name groups merge (setting)
- [x] Duplicates always added; "in N places" badge that filters to them
- [x] Groups: rename in place, color, merge into, delete (to Dustyard), collapse, new group, drag to reorder
- [x] Drag tabs within and between groups; "Move to group" in details
- [x] Click opens as a new tab and moves to the Dustyard; Ctrl+click opens and keeps; "Open and keep" in details; Undo
- [x] Open all with a warning above N (default 10), reopening as a Chrome tab group with name and color
- [x] Ratings: 0–3 stars, clicking the current star clears it, +1 past 3
- [x] Notes per item; Notes section remembers rating and note per page, greyed when not in the list, restored on re-save; Add back; Forget
- [x] Dustyard: opened or deleted, added and closed dates, time in list, group, rating, note; Put back; Delete for good; filters; stats
- [x] YouTube capture at save time (length, position, channel, description, publish date) and watch-page lookup for the rest; resume at saved position
- [x] Views: groups, newest, oldest, rating, longest, shortest, has notes, in 2+ places, by site; search with quotes and minus
- [x] Backlog meter: tabs, groups, hours to watch, days at daily pace, oldest and typical age, this week in and out, unrated
- [x] Settings, theme (auto, dark, light), shortcuts, storage used, about
- [x] JSON backup and restore (merge or replace), backup reminder, text import (OneTab format, paste or file), text and CSV export
- [x] Toolbox download page with install and update steps and version history; `make-release.mjs`; zips kept per version
- [x] Thumbnail (`shell/images/thumbs/dustytab.svg`), `ti-tabs` sprite icon redrawn, favicon
- [x] Unit tests (32) and an end-to-end test that loads the real extension (18 checks)

## Phase 2a — v1.1.0: Dusty, Auto dust, titles, transcripts, Stats, showcase (done)

- [x] Dusty: opt-in, days setting, "flag" or "move" mode, skip starred or noted tabs; Dusty section with Keep, Keep all, open, let go, let all go; tabs keep their group and show "from <group>"; dusty chip and banner in the List
- [x] Locks on tabs (note panel) and groups (header); locked means never dusty and never auto dusted
- [x] Auto dust: ALL or ANY; rules for age, dusty-for, no stars, fewer than N stars, no note, loose or named group, video or page, long video, duplicate, seen before, sites; "never younger than" floor; whole-group mode; heads-up window
- [x] Auto dust settings as a draft with a live preview and Apply (asks when tabs would go at once); runs hourly via `chrome.alarms`, at browser start and when the page opens; dusted tabs go to the Dustyard as `dusted`; put-back restarts the clock
- [x] Dustyard knows "dusted" (filter, label, stats); CSV has `via` and `locked`
- [x] Placeholder YouTube titles replaced from the watch page, with oEmbed as a fallback
- [x] Transcripts (experimental): panel API, caption file, background tab; grab while saving (opt-in); bulk; Transcript lab with a log; stored separately and included in backups; `TRANSCRIPTS.md`
- [x] Stats section: headline tiles, weekly saved vs. cleared, tabs and hours over 12 weeks, age histogram, wait-before-leaving small multiples, top sites, ratings; tooltips and table views; palette validated for both themes
- [x] Showcase: 33 s explainer and 4 s logo loop (with MP4s), animated card thumbnail with a still version
- [x] Unit tests (50) and end-to-end checks (25)

## 1.2.1 — fast with big lists (done)

- [x] Profiled with Austin's real backup (286 groups, 1,780 tabs): 8.6 s to open, 141,000 elements (81,000 of them hidden "Merge into" options), 2.7 s per redraw, a redraw on every storage write
- [x] Group menus built when opened; color picker built on first click; one shared date formatter; icons copied from templates
- [x] Progressive drawing with "Show more" / "Show all" and loading near the end of the page; scroll position kept across redraws
- [x] Storage changes drawn once per frame and not while hidden; small changes redraw only their rows and the meter; stars, +1 and locks shown first and saved after
- [x] Video lookups three at a time, one save per batch
- [x] `tests/e2e/perf.mjs` with limits (1.2.0 fails it, 1.2.1 passes): open about 0.5 s, 9,000 elements, star 40 ms
- [ ] If lists grow ten times bigger: split storage (per group, and video descriptions in their own key like transcripts) so a save doesn't rewrite everything; a save into a 1,800-tab list takes about 0.4 s now

## 1.2.0 — Capture mode (done)

- [x] Capture mode in the service worker: every tab group that opens while it is on is saved (name, color, tabs) once it stops growing, then closed; write first, close after; waits up to 1.5 s for titles; keeps the window if the group was all of it
- [x] On/off from the List toolbar, Settings and the toolbar right-click menu; REC badge; live bar with count and log; stored in `chrome.storage.session` (off after a Chrome restart)
- [x] DustyTab's own Open all pauses capture so it is not grabbed back
- [x] End-to-end checks for capture, the Open all exception and Stop (27 checks)
- [ ] Optional: fetch page titles for captured non-YouTube links (needs an optional all-sites permission; DECISIONS Q16)
- [ ] Optional: a "delete these from Chrome too" helper if Chrome ever exposes saved groups to extensions

## 1.1.1 — safer updates (done)

- [x] Reproduced the update path with the real 1.0.0 and 1.1.0 zips: a full copy works and keeps the data; mixed files can fail to start
- [x] `boot-check.js`: "DustyTab couldn't start" screen with the error, the fix and "Copy error details" instead of a blank page
- [x] Version check (manifest, page, scripts) with a red notice; version shown in the header; `app.js` tolerates an older page
- [x] `make-release.mjs` refuses mismatched versions; `HOW-TO-INSTALL-AND-UPDATE.txt` in the zip
- [x] Download page: "page not loading?" note, rewritten Install, Update (empty the folder, paste, reload) and troubleshooting
- [ ] An in-extension update check (compare with `releases.json` on the toolbox and say "1.2.0 is out") — needs a decision, it would be a new network request

## Phase 2 — use it, then polish

- [ ] Austin's first-week notes go here
- [ ] Multi-select (checkboxes or Shift+click) for bulk move, rate and delete
- [ ] Keyboard navigation in the list (arrows, Enter to open, 1–3 and + to rate, N for note, Delete)
- [ ] Automatic weekly backup file to Downloads (needs the `downloads` permission; Q6)
- [ ] Show a group's total watch time and unknown count more prominently; "watch time" filter (under 10 min, 10–30, over 30)
- [ ] Performance check with 5,000 items (generate a backup and import it); split storage if saves get slow
- [ ] Check that discarded (sleeping) tabs and YouTube Shorts capture as expected on real Chrome
- [ ] Decide whether the list page should open pinned, or in its own window (Q5)

## Phase 3 — transcripts, summaries, chat

- [ ] Transcript lab results from Austin's PC (which routes work): …
- [ ] Harden the routes that work; drop the ones that never do; try the fallbacks in `TRANSCRIPTS.md` (catching the player's caption response, panel scraping, a local yt-dlp helper)
- [ ] Search inside transcripts
- [ ] Record the provider, model and key-handling decisions (Q7, Q8) before any code
- [x] Transcript fetch, stored separately; graceful "no transcript" (experimental, 1.1.0)
- [ ] Settings field for the API key, "test key" button
- [ ] Summarize one item; summarize many with a cost estimate first
- [ ] Chat panel over the list with a cached snapshot; answers that reference items; confirmed actions

## Phase 4 — habits

- [ ] Triage mode
- [x] Weekly intake vs outflow chart (Stats, 1.1.0)
- [x] Stale-tab suggestions (Dusty, 1.1.0)
- [ ] Optional backlog budget
- [x] Dustyard insights: how long things wait, which sites pile up (Stats, 1.1.0)
- [ ] Stats per group and per channel; a weekly watching goal
