Repository navigation
Conversation
…exist The Docs panel, thread cards, the Document tab and the Markdown opener now share one document session fed by experimental_useRpcQuery reads and experimental_useRpcMutation writes. The session keeps the local draft authoritative: remote changes that touch other lines merge into it, and overlapping ones keep the draft and offer Keep mine / Use theirs in place. - readDocument returns the file, its proposal and the preview link as one serialized snapshot; saveDocument saves and, from the Docs panel, renames the file after its first heading in the same vault-serialized request. - Every write path (RPC, CLI, HTTP, sync, the vault watcher) invalidates the document, folder, tree and vault tags it changed; the realtime vault-changed / proposal-changed signals and the renameToTitle RPC go away. - Vault watchers and remote-vault polling run only while a tree or document of that vault is watched, debounce per vault, and drop the echo of the server's own writes. - The editor stays mounted across renames and preview-link renewals, applies outside text without entering undo history, and reuses its own blocks for unchanged Markdown so the paragraph being typed is never replaced. - A document moved or deleted elsewhere stops saving and offers Save a copy; a removed vault makes the editor read-only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Editing a heading no longer renames the file, so thread cards, Document tabs, and links keep pointing at the document. Only a note still named Untitled takes its first heading as its file name when saved from the Docs panel. Card and tab labels follow the document's opening heading. An outside change that lands while there is unsaved typing now keeps the typing and offers Keep mine or Use theirs instead of merging lines, and a document that is missing on first load shows one notice instead of a raw error over an endless skeleton. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Switching notes in the Docs panel used to blank the pane and flash a skeleton while the next note loaded. The next note now loads hidden and replaces the current one in a single frame, with focus at its end; a note that takes longer than a second shows its skeleton as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Clicking below a document, in the Docs panel or a thread's Document tab, now puts the caret at its end; clicking beside the text puts it on the nearest line. The Document tab's editor fills the tab so the empty space under a short document belongs to it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
deleted the
bb/docs-plugin-find-what-s-broken-rebuild-on-today-thr_gf4qmstczc
branch
October 23, 2026 22:25
Merged
ymichael
added a commit
that referenced
this pull request
Oct 24, 2026
## Human comments ## What was wrong `main` has 14 commits since 0.47.0, including #6195, which fixes the timeline staying detached at the bottom (a regression from #5951 that shipped in 0.47.0). `bb-app` and `@bb/desktop` were still at 0.47.0, so the publish and desktop workflows can't ship them. ## What changed - `packages/bb-app/package.json`, `apps/desktop/package.json`: 0.47.0 → 0.47.1 (`node scripts/bump-version.mjs --patch`). - No `CHANGELOG.md` or `RELEASE_META` entry: like earlier fix-only patches, these changes go into the 0.48.0 notes. The release commit sits directly on `b17bfc8fdd` (#6217). Everything below was tested on `22d41249ee`, and the sidebar was tested again on `b17bfc8fdd`. This release includes the daemon protocol bump from #6185 (251 → 252), so enrolled machines will update their daemon. ## How you verified - `node .github/workflows/check-version-lockstep.mjs`: `bb-app=0.47.1 @bb/desktop=0.47.1`. - Typecheck, tests and the `bb-app` tarball smoke run in CI on this PR, instead of locally. - `git diff --check`, and `oxfmt --check` on the changed files: clean. - Manual QA of `22d41249ee` with `pnpm start:worktree` (production bundle) and headless Chrome, on a fresh data dir: - **Timeline (#6195):** a long unread reply stops at NEW, detached. A short unread reply opens at the end with no jump arrow. Scrolling up 150 px and growing the viewport 900 → 1200 attaches. Scrolling up 400 px and growing it stays detached. Sending after scrolling up 1,800 px jumps to the end and follows the streamed Claude Code reply. The view is still at the end after a reload. - **Docs (#6146):** typing in a note while `bb docs pull`/`push` appended a paragraph kept both edits on disk and in the editor. A stale push after a UI edit was refused as a conflict. A new note was renamed from its first line and kept its Markdown after a reload. - **Skills (#6185):** `bb project commands` lists project skills from the documented roots for Claude Code and Codex, with no duplicate names. A Codex `/skill` turn ran the skill. - **Storage & retention (#6190, #6205):** two outside worktrees were listed. Bulk removal removed the clean one, kept its branch, and kept the dirty one. The table fits a 390 px viewport. - **Sidebar multi-select (#6191, #6217), on `b17bfc8fdd`:** with the experiment on, Cmd+Shift-click selected a second thread without navigating ("Actions for 2 threads"). Pressing it again on the same thread deselected it. Shift-click selected a range of 4. Escape cleared the selection. Cmd-click cleared the selection and opened a split. Bulk Pin applied to the two selected threads (checked with `bb thread list`). With the experiment off, Cmd-click opens a split. - **omp (#6186):** the picker labels GPT-5.6 Terra rows `openai` and `openai-codex`. Not exercised: the Ultrafast icon (#6198), because no Codex model on the test account offers Ultrafast. Also not exercised: the Android touch-drag attach, the desktop app, the SDK realtime reconnect (#6183) and retryable host RPCs (#6184). Those last two are covered by unit tests only. > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
Docs had two document stacks and a hand-rolled tree store, all driven by broad
vault-changedsignals. The Docs panel (NotePane→useSavedDocument) never listened for changes: saves from another window,bb docs write, agent turns and external editors never showed, and typing on that stale view ended in "Changed on disk / Reload (whole page) / Overwrite". Every save also ranrenameToTitle, which renamed the file after its heading. That broke every thread card, Document tab and link pointing at the old path ("HTTP 404: Path does not exist" plus an endless skeleton). The pane was keyed by path, so the rename also destroyed and rebuilt the editor mid-typing: keystrokes were dropped and the caret jumped. Thread cards did refresh, but they compared SHAs and threw a conflict whose Retry re-saved against the old SHA forever. They applied remote text withaddToHistory: true, so Cmd+Z reverted an agent's edit and saved it back, and they rebuilt the editor whenever a new preview link was minted. Switching notes blanked the pane and flashed a skeleton, the first click from/docsre-listed the vault and blanked the tree, and clicking the empty space under a note didn't focus it. The native watcher shared one debounce across vaults, so a change in one vault could swallow another's signal, and remote vaults were polled every 10 s even when nobody was looking. Findings with exact steps are indocs-findings.mdin the investigation thread's storage.What changed
Everything is in
plugins/docs. There is no other package change, no SDK or plugin API change, no bb.db schema change and no daemon protocol change.document-session.ts). Reads come fromexperimental_useRpcQueryand writes go throughexperimental_useRpcMutation. Views of the same document share one read. The local draft is authoritative:title), and editing it never renames the file, so cards, tabs and links keep working. A newUntitlednote takes its first heading as its file name the first time it's saved from the Docs panel, inside the save request. Card labels and the Document tab's header follow the note's opening heading.readDocumentreturns the file, its proposal and the preview link as one snapshot, serialized with the vault's writes.saveDocumentsaves, names anUntitlednote when asked, and refuses a stale SHA with aconflictrefusal.renameToTitleis gone (only the app called it).contract.tsholds the browser-safe contract and its tags.doc:<vault>:<path>,folder:<vault>:<path>,tree:<vault>,vault:<vault>andvaults.vault-changed/proposal-changedsignals are removed (only the Docs app listened to them).vault-watches.ts, viabb.rpc.experimental_whileWatchedonlistNotesandreadDocument)./docsno longer re-lists the vault, so the tree doesn't blank.Intended changes users will see
Untitlednote is named after its heading, once. The app has no other way to rename a file;bb docs moveand the tree's drag-to-folder still move files.@mention cache relies on its 10 s expiry for edits made outside bb.How you verified
Side by side on real browsers
pnpm start:worktreeran for main at 1e80ca7 and for this branch. Each had identical fixtures: vault Alpha with 41 notes plus folders, an image and HTML; vault Beta with 2 notes; and a thread with three Docs cards in two vaults. Headless Chrome drove each flow with real keyboard input, withfetchandWebSocketinstrumented in the page. "150 ms" adds that much network latency, roughly a remote bb connect URL. Remote writes were made by another client through the Docs RPC, timed exactly 0 ms or 400 ms after the last keystroke. The CLI, external-editor and agent-turn flows used the realbb docsCLI, a shell write, and a Claude Code Haiku turn. "Requests" counts Docs RPC calls in the window after the action./docs)/docsbulk-8-renamed.md, editor replaced;Bulk 8 Renamedbulk-8.md, same editor, focus kept;Bulk 8 Renamed moremeeting-notes-a.mdaction item one, editor replacedmeeting-notes-b.mdBulk 9 Xy ⏎ Body 9.g to type through the rename, editor replacedbulk-9.mdBulk 9 Xyz cont ⏎ Body 9.ype through the rename, editor replacedbulk-9.mdbb docs writeto the open panel documentbb docs pull/push)Every flow uses no more requests than main. Rows marked "-" check behavior, not request counts. Each flow is one run, with medians for timing. Single-run milliseconds vary with machine load; the card-thread and two-window rows are quiet reruns.
Switching notes, frame by frame at 300 ms latency: main goes blank for about 200 ms, shows a skeleton for about 100 ms, then the note. The branch keeps the previous note until the new one replaces it at about 330 ms, with no blank or skeleton frame. A revisit takes 56 ms on the branch and 327 ms on main.
The
bb docsCLI suite ran against both servers (vaults,list,read,write,pull/status/push, stale-push refusal,propose/reject/undo/accept/undo,mkdir/move/remove,vault-add/vault-remove): 20/20 checks pass on both, with identical results.Before and after screenshots of every user-facing change are in the verification report in the thread's storage.
Tests
Untitlednote is named after its heading, and a named note keeps its path when its heading changes;pnpm exec turbo run build typecheck lint test --filter='...[1e80ca7b44]' --continue(the Docs plugin and@bb/bundled-plugins): 60 successful / 60 total. Docs: 125 tests.generate:bb-official-marketplacewith--forcepasses; the overview is 1,918 characters.🤖 Generated with Claude Code