Skip to content

Keep note reverts and Knowledge access inside their project - #237

Merged
BunsDev merged 10 commits into
notes-projectsfrom
notes-scope-repair
Oct 15, 2026
Merged

BunsDev merged 10 commits into
notes-projectsfrom
notes-scope-repair

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Fix review findings in #227: validate the historical parent before reverting a page, and reject Knowledge access when a captured workspace/project path is replaced by a symbolic link. Carry the reviewed folder collision, interruption recovery, and collapsed-container creation repairs from #235.

Verification: full repository build passed. Maintenance suite passed 106 of 107 tests; the archive CLI subprocess timed out under host load, and its isolated rerun passed. All core, desktop, site, and Store package suites then passed. Independent integration review found no blockers. Local Notes UI acceptance stopped in native-show setup before feature assertions; hosted checks remain required before landing.

Coven-Harness: Codex / GPT-6

Retry a Fable usage-credit refusal on Opus only before a reply, reasoning, or tool activity starts. Preserve the Claude session, explain the switch, and attribute Auto history to the model that ran. Retain the one-hour cooldown and Settings opt-out.

Resolve current-main conflicts while preserving the newer iPhone archive long-press recovery regression and reviewed fallback corrections.

Coven-Harness: Codex / GPT-6
Rows are insert-only and since() flushes the pending batch first, so an
exclusive cursor is exact. A snapshot pairs with latest() taken in the
same synchronous step; re-applied events must be harmless (item_update
patches are whole values, item events upsert by id); pruned cursors
need a reload answer.

Coven-Harness: Claude Code / claude-opus-5-5
A pull request's own run reports the required unit + e2e (macOS) check, so
a push-event run on a PR branch only queued a second, identical macOS run
beside it. On 2026-10-15 about 30 runs waited for 2-3 hosted macOS runners.
main still runs after every merge, and the Release workflow keeps its own
tag trigger.

Coven-Harness: Claude Code / claude-opus-5-5
tmpdir() and the e2e seedHome() created a fresh home or repo for every
test and never removed it: by 2026-10-15 about 170,000 such folders
(24 GB) had filled the disk. Both now record what they create and
remove it when the process exits (node --test runs each file in its own
process; Playwright workers exit after their tests). Set
MODEX_KEEP_TEST_TMP=1 to keep them for debugging. The layout test's two
direct mkdtemp calls use the helper too. A full unit run now leaves
about nine folders, from native helper builds and Node's compile cache,
instead of hundreds.

Coven-Harness: Claude Code / claude-opus-5-5
* Show live model usage in an Analytics surface from the rail

Each turn that calls a model, Auto or not, now adds one row to
app/usage.jsonl: tool, model, thread, project, account, and the turn's
input, cache reads and writes (summed over every call by UsageMeter) and
output. Prompts, files and replies are never recorded; costs stay null.
A ledger failure is logged and never changes the turn.

The rail's new Analytics icon opens the existing usage dashboard on
those rows. The dashboard keeps its own global styles, so it runs as a
separate document in a WorkspaceBrowser view served from
modex-analytics://app/ in an in-memory session, with the rows at
usage.json and every other request refused. Its Demo Data wording now
appears only in the standalone preview. Settings > General can hide the
icon; the Store app leaves Analytics out.

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

* Open Settings' General section before toggling Analytics in the spec

Settings opens on Auto routing, so the rail option was never on screen.

Coven-Harness: Claude Code / claude-opus-5-5
Reject cross-project historical parents during page recovery and revalidate knowledge search roots after project or workspace symlink replacement. Include regression coverage and integrate current main.

Coven-Harness: Codex / GPT-6
…222)

* Add NotesStore: Space pages as Markdown files under MODEX_HOME/notes

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

* Keep Space pages as Markdown files in the notes folder (#225)

* Preserve Notes hierarchy through collisions and interrupted writes (#231)

Coven-Harness: Codex / GPT-6
Merge current main recovery fixes and the reviewed tree repairs: recover default project location after interrupted moves, replay folder moves without losing external edits, and expand containers when creating children.

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 4:56pm UTC

Request Review

AGENTS.md said remote refs are never pruned automatically, and the hygiene
doc that remote branches are never deleted. Both describe the worktree
tools, but the repository now deletes a PR's branch when it merges
(delete_branch_on_merge, on since 2026-10-15). Say that, note that stacked
PRs move to the merged PR's base, and that merge proof does not need the
deleted branch.

Coven-Harness: Claude Code / claude-opus-5-5
Preserve verified project-scoped notes source while incorporating ownership-safe recovery instructions.

Coven-Harness: Codex / GPT-6
@BunsDev BunsDev self-assigned this Oct 15, 2026
BunsDev added a commit that referenced this pull request Oct 15, 2026
#238 already carries #237's note-revert and Knowledge-scope repairs, so every conflict
resolves to #238's side and the tree is unchanged; this records #237's ancestry.

Coven-Harness: Claude Code / claude-opus-5-5
@BunsDev
BunsDev merged commit 8dccb32 into notes-projects Oct 15, 2026
5 checks passed
@BunsDev
BunsDev deleted the notes-scope-repair branch October 15, 2026 17:57
BunsDev added a commit that referenced this pull request Oct 15, 2026
Coven-Harness: Claude Code / claude-opus-5-5

This branch was successfully deployed

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