Skip to content

Preserve Notes hierarchy across interrupted renames and moves - #235

Closed
BunsDev wants to merge 17 commits into
release-reviewed-batchfrom
notes-tree-repair
Closed

BunsDev wants to merge 17 commits into
release-reviewed-batchfrom
notes-tree-repair

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Integration target: release-reviewed-batch. This reviewed update will land through the combined batch and its protected squash to main; Images/Plugins #236 is excluded.

Fix review findings in the Notes Tree feature now landed through #226: reserve folder-note names before moving, recover interrupted folder settlements without overwriting intervening edits, retain the default project by identity after rename, and expose creation inputs in collapsed containers.

Verification: full repository build and unit suite passed for tree 88a9c90e864263d4151aa0d298d1f7de4110f0dd; independent regression review passed. Current tree f1e17a4999f60b804f7b6cb454dba96a494c0e03 differs only in worktree documentation. Reconciliation with the #226 squash preserves that exact tree. Local Notes UI acceptance was attempted but failed in native-window setup before feature assertions; current-head hosted acceptance must pass before landing.

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
Store now holds a NotesStore over MODEX_HOME/notes instead of SpaceStore
over app/space.json; the space:* commands and the Pages tools keep their
contract. On first use, the pages of app/space.json move into
Personal > Notes and that file is never written again.

A page's file takes its title's name when the title loses focus or
another page opens (notes:settle); typing never renames files. Version
history labels edits made outside Modex "Outside Modex".

The e2e specs that read space.json now read the note files, and the
forced save failures refuse the history folder instead of replacing
space.json with a directory. New notes.spec covers the migration and an
edit made outside Modex.

Coven-Harness: Claude Code / claude-opus-5-5
NotesStore now lists the folder as workspaces, projects, folders, notes
and files (notes:tree, with a version for cheap polling). It can create
workspaces, projects and folders, create a page in a project or folder,
rename any container or file, move notes, folders and files into a
project or folder (projects into a workspace), and delete an empty
container. Workspace and project ids live in their marker files; other
folders and files keep theirs in the index, found again by path or by
inode after a Finder move. A moving page gets a version before its file
moves. Reveal in Finder and Open are local-only commands.

Coven-Harness: Claude Code / claude-opus-5-5
Space's sidebar now lists Workspace > Project > Folder > pages and
files from notes:tree, polled like pages. Space options can create a
workspace; a row's menu creates a project, folder or page in place,
renames (edited inline), moves (Move to... lists only valid places),
reveals in Finder, and deletes what is empty. A page opens as before, a
folder with a folder note opens that page, and a file opens in its
default app. Container rows are named by their name alone so they never
collide with a page of the same title. If the tree cannot load, the
previous page tree remains.

Coven-Harness: Claude Code / claude-opus-5-5
# Conflicts:
#	apps/desktop/src/main/commands.ts
#	apps/desktop/src/main/index.ts
#	apps/desktop/src/shared/types.ts
#	apps/store-desktop/src/main/demo.ts
#	docs/status.md
uniqueName compared the bare stem against names with their extension,
so for any extension but .md a taken name went unseen: renaming or
moving a file next to one of the same name failed with EEXIST instead
of getting a suffix. A note and a folder of one name still collide.

Coven-Harness: Claude Code / claude-opus-5-5
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
Recover interrupted folder moves without child-name collisions or lost external edits. Preserve default project identity across renames and moves, and expand collapsed containers for child creation.

Include current main and reviewed NotesStore repairs in the verified integration.

Coven-Harness: Codex / GPT-6
Record the landed NotesStore ancestry while preserving the verified notes tree fixes without changing the source tree.

Coven-Harness: Codex / GPT-6
@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 5:44pm UTC

Request Review

Coven-Harness: Claude Code / claude-opus-5-5
Its tree equals #222's final head, which notes-tree already contains.

Coven-Harness: Claude Code / claude-opus-5-5
Coven-Harness: Claude Code / claude-opus-5-5
Integrate the upstream branch's main ancestry and worktree documentation while preserving the verified application source tree.

Coven-Harness: Codex / GPT-6
BunsDev added a commit that referenced this pull request Oct 15, 2026
#238 already carries #235's folder-move and default-container repairs, so every conflict
resolves to #238's side and the tree is unchanged. The merge brings in #235's and
notes-tree's ancestry so later merges of #226's squash and main do not conflict again.

Coven-Harness: Claude Code / claude-opus-5-5
Base automatically changed from notes-tree to main October 15, 2026 17:36
Record the squash-merged notes tree ancestry while retaining the already verified move, recovery, and creation repairs. The resulting tree is unchanged.

Coven-Harness: Codex / GPT-6
@BunsDev

BunsDev commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

Landed on main: these notes-tree repairs were already carried by #238 and landed with #227 (squash a2140e6), and #243 records this branch's ancestry. Closing as landed.

This branch was successfully deployed

1 active deployment
Preview — 57e6d001 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