productivity plugin: dashboard.html forgets TASKS.md / memory folder on every reload

Aperta Adatta ai principianti
#1,095 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@AbarnaaSree ci sta già lavorando.

Dal 17/9/2026.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
html, javascript
Ambito
frontend

Direzione di ricerca

Inizia da productivity/skills/dashboard.html e dal dashboard-reconnect.patch allegato; esamina il flusso esistente di showOpenFilePicker/showDirectoryPicker e il markup dello stato vuoto. Verifica in un browser basato su Chromium che il ripristino dopo il ricaricamento funzioni, che le richieste di autorizzazione offrano Reconnect, che i picker alternativi rimangano disponibili e che le voci spostate o eliminate ricadano sul picker normale.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

dashboard.html (from the productivity plugin) uses the File System Access API (showOpenFilePicker / showDirectoryPicker) to load TASKS.md and the memory/ folder. Every time the dashboard is reopened — a new browser tab, a restart, even just closing and reopening the file — it forgets the file/folder you picked last time and makes you re-select both from scratch. For a dashboard meant to be a daily driver, that's a meaningful bit of friction.

Proposed fix

dashboard-reconnect.patch

The File System Access API supports persisting a FileSystemFileHandle / FileSystemDirectoryHandle in IndexedDB and re-querying permission on it later (handle.queryPermission() / handle.requestPermission()), without re-showing the picker dialog. I've implemented this in our own copy of dashboard.html:

After a successful pick, the handle is saved to a small IndexedDB store (productivity-dashboard / handles).
On page load, the dashboard tries to restore the saved TASKS.md handle and memory folder handle:
If permission is still granted, it reloads silently — no prompt at all.
If permission needs reconfirming (prompt state), the empty-state screen swaps its button to a one-click "Reconnect" instead of the full file picker.
Either way, a second button — "Choose a different file" / "Choose a different folder" — stays visible so switching to a different file is never blocked by the reconnect flow.
If the file's been moved/deleted, it falls back to the normal picker automatically.

This only touches dashboard.html (two new small buttons in the empty-state markup, plus the IndexedDB helper + refactored load functions in the script). No changes to TASKS.md/CLAUDE.md format, no new dependencies, no build step.

A patch is attached (dashboard-reconnect.patch) generated against the current productivity/skills/dashboard.html, and I'm happy to open this as a PR directly if that's preferred over a patch on an issue.

Caveats worth noting for reviewers
This relies on the File System Access API, so it only works in Chromium-based browsers (Chrome, Edge, etc.) — same limitation the dashboard already has today for the picker itself.
The saved handle lives in the browser's IndexedDB for the page's origin (typically shared across local file:// pages in Chromium), not in the markdown files themselves, so it's per-browser/per-machine and never travels with the files — confirmed this doesn't leak across users if the same dashboard.html is shared or copied.

Lingua principale
Python
Stelle
36.8k
Fork
4.1k
Merge medio
1g 23h
PR unite (30g)
17

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di anthropics/knowledge-work-plugins

Tutte le issue di anthropics/knowledge-work-plugins

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.