Skip to content

Add NotesStore: Space pages as Markdown files under MODEX_HOME/notes - #222

Merged
BunsDev merged 5 commits into
mainfrom
notes-store
Oct 15, 2026
Merged

BunsDev merged 5 commits into
mainfrom
notes-store

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Space pages now live as Markdown files under MODEX_HOME/notes, with stable frontmatter IDs, history and comments, cascading trash/restore, and recovery after interrupted writes. This PR includes the Space activation from #225 and the reviewed data-integrity fixes from #231.

Existing app/space.json data migrates with IDs, revisions, history and comments intact; the original file is preserved with a backup. External file edits become versions, and moves/renames retain page identity. Collision handling preserves parentage during folder settlement, restore and migration; a durable journal completes interrupted directory/note renames.

Review follow-up #231 passed 38 focused Notes tests, full build/unit tests, 295 desktop E2E tests (3 skipped), seven site tests, and hosted macOS/iPhone checks. Its fixes are integrated at 2df33d70c602c3323a75a8944acff5854faf92f3; fresh combined-head CI is required before main.

Follow-on stack: #226 adds the workspace tree; #227 adds project-scoped notes and agent access; #230 adds file import, previews and watching. Those layers receive separate review and validation.

Coven-Harness: Codex / GPT-6

The first slice of notes in folders. NotesStore keeps SpaceStore's page
contract (ids, revisions, 30-second typing checkpoints, cascading trash
and restore, revert, comments, the same error texts) over a folder laid
out Workspace > Project > folders, with Personal > Notes as the default.

Each note carries modex_id frontmatter, so moves, renames and crashes
never lose which page a file is; a page with children is a folder that
holds a folder note of the same name. Version history, comments, trash
batches and a last-seen index live in .modex/. Writes go history, note,
index, and reading finishes whatever a crash interrupted. Edits, moves,
new files and deletions made outside Modex become versions of their
own. Migration builds the folder beside notes/ from app/space.json and
publishes it with one rename, never writes space.json, keeps a backup,
and recovers pages an older build changes later.

Modex does not use it yet; SpaceStore now exports its reader and
validators and a SpacePagesStore interface for the switch.

Coven-Harness: Claude Code / claude-opus-5-5
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Oct 15, 2026 3:40pm UTC

Request Review

status.md: keep main's new entries (one CI run per PR push, the Fable
fallback) and then the notes entry.

Coven-Harness: Claude Code / claude-opus-5-5
@BunsDev
BunsDev merged commit 8035e16 into main Oct 15, 2026
12 checks passed
@BunsDev
BunsDev deleted the notes-store branch October 15, 2026 16:08
BunsDev added a commit that referenced this pull request Oct 15, 2026
Coven-Harness: Claude Code / claude-opus-5-5
BunsDev added a commit that referenced this pull request Oct 15, 2026
Its tree equals #222's final head, which notes-tree already contains.

Coven-Harness: Claude Code / claude-opus-5-5
BunsDev added a commit that referenced this pull request Oct 15, 2026
…ts (#246)

Follow-ups from a code review of the notes stack (#222, #226, #227, #230).

Knowledge tools fence by real paths: a document path that lands in the notes
folder must land in the turn's own project, whether the knowledge base is the
notes folder, a workspace inside it, a folder that holds it, or a content.dir
inside it. Search over such a base is read locally, asynchronously and
bounded, skipping other projects' notes. Before, only a base that was exactly
the notes root was confined, and a content.dir broke the prefix.

Pages and knowledge tools look up the project's notes on every call, so
moving them to another workspace mid-turn no longer refuses every call. A
read-only turn finds the project's notes without making them, and an unknown
project gets none rather than every project's.

NotesStore: a copied workspace or project folder gets its own id instead of
making the store unreadable; detachProject drops the cached look;
linkProject answers from the last look when already linked; the watcher
ignores dot folders (.modex, .ok, .git) but not markers; pageRels() serves a
whole call. The sidebar hides a workspace whose projects a filter hides.

Coven-Harness: Claude Code / claude-opus-5-5

This branch was successfully deployed

1 active deployment
Preview — 2df33d70 Deployed Oct 15, 2026 by vercel[bot]
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