Skip to content

Complete reviewed Notes and maintenance integration - #242

Closed
BunsDev wants to merge 65 commits into
release-reviewed-batchfrom
notes-final-review
Closed

BunsDev wants to merge 65 commits into
release-reviewed-batchfrom
notes-final-review

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Complete the reviewed Notes stack and maintenance fixes in one integration batch. Project-scoped Markdown notes now support the workspace tree, imported files and previews, durable rename recovery, and scoped agent/Knowledge access. Scope-resolution exceptions refuse access for every thrown value shape; project-focus requests are consumed across sidebar remounts.

The batch also includes Analytics visibility/export/recovery repairs, multiline title paste handling, native window readiness and paired iPhone recovery, and source-mapped production coverage reporting.

Verification: combined build and test:coverage passed (1,540 passed, 16 platform skips). Cobertura contains 212 unique production files with no generated duplicates. Full Knowledge-enabled E2E passed: 307 desktop tests and 7 website tests. The signed, clean verified head is 9322bb2c5d88b5d6cac59f1c6cb9e086b9caa199 (tree 535d5f72a3532c92890465eb9cd19c473727060c).

Scope: this isolated batch excludes Images/Plugins #236. That PR was independently merged into main; release reconciliation is awaiting the maintainer's scope decision.

Coven-Harness: Codex / GPT-6

code-coverage-agent[bot] and others added 30 commits October 15, 2026 06:07
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
# Conflicts:
#	apps/desktop/src/renderer/App.tsx
#	apps/desktop/src/shared/types.ts
#	docs/status.md
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
Settings opens on Auto routing, so the rail option was never on screen.

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
Adding a project now gives it a notes project in the default workspace
(existing projects get one when notes first open); removing it keeps the
notes, unlinked, and adding the same folder again links them back. The
chat sidebar groups projects under their workspaces once there is more
than one, and a project's menu offers Open notes and Move to <workspace>.
With one workspace the sidebar is unchanged.

The thread's right-hand panel is relabelled "Side panel" (and the Store
app's menu with it), so "workspace" means one thing; internal names and
shortcuts are unchanged.

Coven-Harness: Claude Code / claude-opus-5-5
The Pages tools now resolve the turn's project's notes once, when the
turn starts, and stay inside them: search lists only that project's
notes, reading or changing another project's note is refused, and a new
note goes at the top of the project's notes. New tools list a folder,
create folders, move a note or folder within the project, and read text
files (UTF-8, up to 1 MB). Tools still address notes by ID, never by
path, and there is still no binary write or permanent delete.

Coven-Harness: Claude Code / claude-opus-5-5
Space > Knowledge base offers "Use your Modex notes", which makes the
notes folder the Open Knowledge folder, so Space and the knowledge base
are one set of files. A page's menu then offers "Open in knowledge base"
(the page's own file) instead of a copy, and knowledge:copy refuses.

With the notes folder as the knowledge base, each project's agents
read, write and search only that project's notes through the knowledge
tools as well: paths outside are refused before reaching the companion,
and search reads the project's files directly. The routines spec now
puts routine output in the routine project's notes.

The CLI allowlist tests now expect the Pages folder tools added for
project-scoped agents.

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
Ignore delayed navigation completions after hide, disposal, or newer bounds. Cover the visibility races and reopening after a hidden load with deferred-browser regressions.

Coven-Harness: Codex / GPT-6
A project's or folder's menu offers Import files…, and files dropped from
Finder onto a project or folder are copied there: regular files only, up
to 50 at a time and 100 MB each, never replacing anything (a taken name
gets a number). Clicking a file previews it. Images are served by id over
modex-notes://file/<id>, which serves only image files of the notes folder,
with no scripts or subresources; text files up to 1 MB show as text; anything
else offers Open and Reveal in Finder.

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

Dragging a tree row onto a place it may go moves it there, with the same
targets as Move to. A page's image named by a path relative to its file
(as Open Knowledge writes them) loads over modex-notes://page/<id>/<path>,
only when it is an image inside the page's own project after following
links, and outside dot folders.

The app now watches the notes folder. Reads reuse the last look until an
event arrives, a deletion awaits its second look, or 10 seconds pass; every
change looks afresh. With 500 notes a poll went from about 10 ms to 0.1 ms.

Coven-Harness: Claude Code / claude-opus-5-5
Confine dashboard assets through directory components and keep valid usage records separate from a torn tail.

Coven-Harness: Codex / GPT-6
Inventory all eligible production sources before remapping coverage so unexecuted files appear at zero. Full build and coverage tests, independent review, both hosted macOS runs and hosted iPhone acceptance passed.

Coven-Harness: Codex / GPT-6
The project menu gained Open notes (and Move to <workspace>) ahead of
Remove project, so a newly opened menu focuses Open notes. The
keyboard-primitives spec still expected Remove project to take focus and
failed on CI.

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
Preserve reviewed visibility, CSV export, ledger recovery and asset-path fixes alongside current main. Full build and unit tests pass; independent integration review is clear.

Coven-Harness: Codex / GPT-6
Bound note previews and preserve project isolation during file access
Coven-Harness: Claude Code / claude-opus-5-5
Preserve the main-only push trigger and inventory unexecuted production source alongside remapped test coverage.

Coven-Harness: Codex / GPT-6
Only AGENTS.md and docs/worktree-hygiene.md change after the successful build and coverage run.

Coven-Harness: Codex / GPT-6
The runner prepares Pages on every turn, and preparing now links the project's notes. A
symlinked notes folder or a corrupt marker made that throw, which failed every turn in
every project, even with Agent notes off. Preparing now records the error on the lease;
each Pages call refuses with it instead of running unscoped.

Coven-Harness: Claude Code / claude-opus-5-5
The focus effect re-ran whenever the tree changed, and any page save makes a new tree on
the next 1.5-second poll. After Open notes, typing in another project's page kept
re-expanding the requested project and scrolling the tree back to it, and its row stayed
highlighted. Each request is now a new object, applied once, and opening a page clears it.

Coven-Harness: Claude Code / claude-opus-5-5
Each folder and file looked itself up by searching the whole id index, by path and then by
inode, and each sibling group was copied on every insert. A layout runs on Space polls,
at turn start and in the image handler, and with 9,900 files it took 21 to 51 seconds on
the main process. The index is now read into path and inode maps once per layout and
kept current as ids move. The same folder lays out in about 0.25 seconds.

Coven-Harness: Claude Code / claude-opus-5-5
Its tree equals #226's final head 8cdaef5, which this branch already contains.

Coven-Harness: Claude Code / claude-opus-5-5
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
Coven-Harness: Claude Code / claude-opus-5-5
Preserve the Analytics review fixes and current NotesStore source. Full build and unit suite passed.

Coven-Harness: Codex / GPT-6
Files in notes: import, preview, drag to move, page images, and a folder watcher
Coven-Harness: Claude Code / claude-opus-5-5
Full build and unit suite passed. All 303 desktop E2E cases, including real Knowledge, and all 7 website cases passed.

Coven-Harness: Codex / GPT-6
Integrate reviewed notes work and native test readiness. Refuse Pages access for every scope exception shape, consume project focus requests across tree remounts, and cover cached layout identity preservation.

Coven-Harness: Codex / GPT-6
The reviewed native implementation is already present unchanged in this verified integration.

Coven-Harness: Codex / GPT-6
Preserve the reviewed paste source and regression tests while retaining Notes file previews and one-shot project focus.

Coven-Harness: Codex / GPT-6
Retain the exact reviewed coverage configuration, CI gates, and dependency lockfile.

Coven-Harness: Codex / GPT-6
Preserve the reviewed Analytics files exactly, including stale visibility cancellation, narrow CSV downloads, torn ledger recovery and asset link rejection.

Coven-Harness: Codex / GPT-6
Preserve the existing repaired source, expanded regression coverage, and current release documentation.

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 6:52pm UTC

Request Review

@BunsDev

BunsDev commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

Landed on main in #243 (squash 4408c9c), which merged the reviewed release batch (#242, notes-final-review 9322bb2) into main for v0.1.0. Closing as landed.

This branch was successfully deployed

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