Skip to content

feat: dossiers start as named drafts and get a folder when saved - #53

Open
francescobianco wants to merge 3 commits into
mainfrom
feat/dossier-drafts
Open

francescobianco wants to merge 3 commits into
mainfrom
feat/dossier-drafts

Conversation

@francescobianco

Copy link
Copy Markdown
Member

First step of the dossier work for the next release (spec in #51).

What changes for the user

  • New Dossier asks only for a name. The dossier is a draft, fully usable (import, ingest, ask), stored in $XDG_DATA_HOME/gknowledge/drafts/.
  • Save… (header button, Ctrl+S) or closing the window gives it a folder: by default ~/Documents/Dossiers/<name> (localised Documents dir via user-dirs.dirs), or another folder from the file chooser. Existing folders are never overwritten (<name> (2)).
  • Closing with a draft open asks: Save… / Keep as Draft / Cancel. Kept drafts reopen at next launch: nothing is lost.
  • A saved dossier shows <name>.dossier, sources/, knowledge/, notes/; database, cache and settings live in a hidden .dossier/ with a generated .gitignore.
  • <name>.dossier is registered as application/x-dossier (shared-mime-info + desktop file): double-click opens the dossier. Open Dossier… now picks a .dossier file (or a legacy gknowledge.json).
  • Flatpak: --filesystem=xdg-documents/Dossiers:create so the default home works in the sandbox.

Compatibility
Projects created with 0.3 (gknowledge.json, index/, settings/ at the root) open unchanged; no migration is run. The class is still Project; the code rename and the plain-file ledger come in follow-up PRs.

Tests

  • tests/test_dossier.py: drafts, saving, no-overwrite, localised Documents dir, launcher open/rename, legacy layout untouched. 44 passed with pytest; make test and make check pass.
  • GTK flows driven programmatically on X11: name dialog (Create disabled until a name is typed), draft subtitle and Save button, save to the default home, close-with-draft dialog and Keep as Draft.

🤖 Generated with Claude Code

francescobianco and others added 3 commits October 27, 2026 19:54
New Dossier asks only for a name; the draft lives in the user data dir
and is moved to ~/Documents/Dossiers/<name> (or a chosen folder) on
Save or when the window closes. Saved dossiers show a <name>.dossier
launcher (registered MIME type, opens the app), sources/, knowledge/
and notes/; derived state moves to a hidden .dossier/. Legacy projects
open unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant