anthropics / anthropics/knowledge-work-plugins

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

Ouverte
#1,095 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
24k
Forks
2.9k
Merge moyen
1 j 16 h
PR mergées (30 j)
149

Description

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](https://github.com/user-attachments/files/32019770/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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.