Repository navigation
Conversation
The composer printed the selected passage back inside itself, six inches from the accent-tinted mark the page now paints on that same passage while the box is open. Two statements of one fact, in a box 320px wide. The quote stays as the fallback rather than the statement: it shows where the mark can't, which is where this version no longer holds the passage. That is a reachable state, not a hypothetical one. A draft survives the version it was written against, so a reviewer who takes the "new version available" chip mid sentence lands on a page that rewrote the passage out. It gets the panel's detached treatment, dashed and muted, for the same fact. Out of sight is not gone. A painted mark has no accessibility exposure at all (CLAUDE.md, "Paint; don't wrap"), so the quote stays in the tree as the box's aria-describedby, which is more than the visible quote ever said: nothing pointed a reader at that. paintAnchors is the one writer, since it is already where it is known whether the page is showing the passage. openComposer no longer touches the node. anchorLabel now formats an anchor for the panel and the composer alike. Two things the removal turned up: placeComposer. Measured in Chrome, not reasoned: a restored draft reappears just under the banner and restoreView puts its passage back where it was, so for a passage near the top of a narrow column every rect of the mark lands inside the box. With the quote gone, nothing said what the draft was about. The box now moves below (or above) a mark it has swallowed whole, reading the geometry off paintAnchors' own record. Not off every pixel: the box has always covered the tail of a long passage, and that reads fine. cq-ui on the quote node. Carrying the description costs it an id, which made it the one piece of injected chrome that could answer "which section of the document is this in" with itself, and the reading position rides on that answer. Five mutations, each caught by a test: dropping placeComposer, inverting the visibility toggle, dropping cq-ui, dropping the textContent write guard, dropping aria-describedby. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Owner
Author
|
Landing this directly on main instead. Closing so the branch can be squash-pushed. |
max-sixty
added a commit
that referenced
this pull request
Aug 19, 2026
…iter #3 asked whether the `resize` listener beside `layoutSizes.observe(document.body)` was a second trigger for one writer. It was load-bearing, and for a reason worth removing rather than documenting: `syncLayout` still wrote body's own box in two places, and the listener was what kept those writes out of the observation round. The margin an open panel takes is now a media query keyed on `data-lf-panel`, which `setPanel` states on body — on body rather than on the panel's own class, which is scoped chrome a page could coin for itself. `data-lf-cramped`, which is body's padding on the theme's side, moves to `stateStrip`, on the two occasions that decide it: the window and the panel. Neither is a reading of the box. So `syncLayout` writes only chrome, the listener goes, and the window reaches the layout the way every other change of the box does. Measured on the way in: the margin write had been surviving because it transitions, so the used value did not move until the frame after it landed; the cramped write went unpunished only because the listener ran ahead of the observation, and removing the listener with it in place put a ResizeObserver loop on the error channel at once. Every mechanism here is gated by a test that already existed — each of the five fails on its own when flipped back. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Aug 20, 2026
…iter #3 asked whether the `resize` listener beside `layoutSizes.observe(document.body)` was a second trigger for one writer. It was load-bearing, and for a reason worth removing rather than documenting: `syncLayout` still wrote body's own box in two places, and the listener was what kept those writes out of the observation round. The margin an open panel takes is now a media query keyed on `data-lf-panel`, which `setPanel` states on body — on body rather than on the panel's own class, which is scoped chrome a page could coin for itself. `data-lf-cramped`, which is body's padding on the theme's side, moves to `stateStrip`, on the two occasions that decide it: the window and the panel. Neither is a reading of the box. So `syncLayout` writes only chrome, the listener goes, and the window reaches the layout the way every other change of the box does. Measured on the way in: the margin write had been surviving because it transitions, so the used value did not move until the frame after it landed; the cramped write went unpunished only because the listener ran ahead of the observation, and removing the listener with it in place put a ResizeObserver loop on the error channel at once. Every mechanism here is gated by a test that already existed — each of the five fails on its own when flipped back. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Sep 9, 2026
A preserving widget with any action or report was skipped by the render gate, so unrelated prose replacement passed. Removing that exemption directly would also reject legitimate reader rewrites and retired content. This compares every preserving owner with the canonical projected passage. Page owners use the rendered revision's page projection; frozen message owners use the conversation projection. Standing reader body edits, retirement and undo, and declared generated additions flow through the existing projection helpers. Reports remain unable to authorize body rewrites. The action and report count now serves only the caught-up readiness wait. Tests reproduce action and report corruption, protect legal rewrite, retirement, and undo behavior, keep a parent wrapper checked when only its child acts, and pin page-versus-frozen scope. Existing dark-mode and anonymous-owner regressions remain green. Completed workspace items #1, #3, and #5 are removed from `TODO.md`. > _This was written by Codex on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Sep 18, 2026
The Lit application arc between 2026-09-13 and 2026-09-17 closed #1 and #3 without the list recording it: `semantic-state.js` is 77 lines over one publisher and `application.js` holds no DOM reference, while `version.js` activates through one door returning one result that `state-application.js` adopts atomically. Both leave for git history. The largest remaining duplication was not on the list. `scripts/browser/application.ts` re-derives the Ask inventory, the winner resolution and each thread's `awaits_reader` from a wire that already carries all three, roughly 750 lines that arrived in #746; the two copies of the `when` predicate already disagree on an attribute recorded as `null`, and nothing compares them. That inverts #4, which asked for a corpus proving parity between the two implementations — built first it would police one that should go — so #4 now names the deletion and the corpus follows it. Three items are new. #25 is the Worker's second App Server client, whose reconnect backoff is written four times and has already drifted. #26 is the generated-hint machine that `go-to-sequence.js` and `target-chooser.js` each build. #27 is admission: six of the nine `append_event` callers check no contract, and of the three that do, `cmd_receipt` uses a validator `requests.py` defines itself, so the rules sit in two homes and the gate in three against a stated boundary of validating once at the edge. They take ids above #23 because `notes/workspace-followups.md` numbers its research #1 to #23 and the workspace section here draws from it, so #9 and #10 were already spoken for. The section now says where its ids come from rather than leaving the next writer to rediscover it. The items that stay keep their numbers and gain what the survey measured: how much of `margin-projection.js` is already free of the DOM, what fraction of the render suite drives no input, and the 53 capabilities `page.js` and `leaf.js` both name. #8 stops waiting for a change to prove the need, which has happened. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
max-sixty
pushed a commit
that referenced
this pull request
Sep 18, 2026
`notes/workspace-followups.md` has been presenting finished work as the plan since 9 September. It opens with "Start #2, #3 and #4 as one coordinated contract batch; run the review-queue simplification #8 alongside it" — all four of those shipped that week — and carries thirteen briefs, each with a live "Next task" and "Done when", for work `TODO.md` dropped as complete. This removes them and leaves the six `TODO.md` still links: #11, #14, #19, #20, #22 and #23. The trim follows the convention #666 set and the reason `CLAUDE.md` gives for it: a note is never a second specification for shipped behavior. #666 removed #6, #7, #16 and #17 the same way, rewriting the two `Owner / dependencies` lines in surviving briefs that named them; it simply did not reach the rest. Each removal is evidenced by the commit that took the item out of `TODO.md`, not by a reading of the current code: | Brief | Removed from `TODO.md` by | | --- | --- | | #1, #3, #5 | [`0f7f06a6`](0f7f06a) — "Completed workspace items #1, #3, and #5 are removed from `TODO.md`" | | #2, #4, #8, #9 | [`28b5da99`](28b5da9) — "the completed #2, #4, #6, #8, #9, and #17 backlog entries are removed while preserving the deferred evaluation work" | | #13, #15 | [`6df40353`](6df4035) — "closes three bounded workspace follow-ups" | | #10, #12 | [`c9eaa2c6`](c9eaa2c) — the continuation cue and the adaptive Threads placement | | #18, #21 | [`e46c8b93`](e46c8b9) — the monitoring workspace and its package-owned root | Alongside the briefs, three group headings are now empty and go; the `Suggested work packages` table loses the rows whose whole scope landed; and four cross-references that named a removed ID are rewritten — #14's dependency on the Threads-placement experiment, #20's ordering behind #8, and the two sentences in `Reproduction record` and `Browser evidence` that pointed at briefs no longer here. #14 needed more than a rewritten pointer. The experiment it waited on was settled in two steps, and only the first removed an ID: [PR #520](#520) kept the adaptive placement and deferred the modal-focus work to #24, which landed in [PR #536](#536) as inertness, dialog semantics and focus containment for a covering workspace. That is the surface #14 exists to verify, so its `Done when` — "Avoid imposing a modal focus trap on a nonmodal panel" — described the containment #536 shipped as the defect to avoid. It now states the containment the shipped modality requires, and the dependency line names both settlements. The dated evidence sections themselves stay. They are the record of what was read in a browser on 8 September, not a plan, and the note's own header scopes them to that date. No test covers `notes/`, and this changes no behavior, so there is nothing to regress. `pre-commit` passes on the file; the `TODO.md` → note anchors all still resolve, and no surviving text references a removed ID. --------- Co-authored-by: leaf-agent <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Sep 28, 2026
…lows the thread, a comment follows its composer (#1396) A user writing on an `lf-diff` line lost the box when the agent set a new patch. Focus fell to the page, so the next letters ran page commands. Two boxes did this: - a reply in a thread on that line: each thread's anchor names the patch it was written on, so a new patch moved every thread out to the margin as "Earlier data"; - a new comment in the composer the diff seats on the line. In both cases the diff rebuilds its whole shadow tree for the new data, and that removes the focused box before any code that could hand the user on runs. The thread pass and the composer's `restoreFab` run afterwards. Each read its hold while focus was already on the body, so each held nothing. ## A hold reads a dropped node `runtime/focus.js` now remembers where the user last stood: the node each `focusin` lands on, and the node a `focusout` with no destination leaves. When the user stands nowhere and that node is no longer drawn, the user was dropped from it. Every placement rewrites the record. A key, press, wheel or touch made while the user stands nowhere clears it, because that is the user going on from nowhere. - `holdFocus(scope)` holds the dropped node when it lies inside `scope`, so every existing hold answers for a change that ran before it. The composer's `restoreFab` needs nothing more. - `holdStanding()` is the same reading without a scope. - A function stand-in now runs as the owner's own act rather than inside `land`, so wherever it moves focus counts as a placement to every other open hold. ## A thread's reply follows the thread `holdReply` (`thread/focus.js`) takes `holdStanding()` at the start of every thread pass when it names a thread's reply box. It restores it once every surface is drawn: the thread goes up where it now stands, through the margin's `openPageThread`, and the user lands in that view's reply box. The draft carries over, since every view keys it on the thread. Neither route is specific to the diff. This is option #3 ("Follow it to the margin card"), picked on the thread-focus review page. ## Tests Each new test fails on main at its focus assertion: - **`test_a_reply_box_whose_thread_leaves_the_diff_takes_the_user_to_its_card`:** the margin card's reply box ends up focused, with the draft and caret kept. - **`test_a_comment_being_written_on_a_diff_line_stays_in_hand_across_a_new_patch`:** the same for the line's composer. - **`test_a_thread_resolved_while_its_reply_is_written_keeps_the_user_on_it`:** an agent resolving a thread the user is replying to leaves them on the thread's card. The first two also check that typing " tr" afterwards goes into the draft rather than running `t` and `r`. `ui-sweep`'s unmerged `87ff1908d` answers the same "has the user moved on" question in `focus.js` with a `focusout` rule. Whichever lands second folds its rule into the other's. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Nov 6, 2026
…ge; travel goes to a passage's first drawn line Placement re-placed a thread only where a change touched the text nodes its last successful match stood in, so what a resolution depends on beyond those nodes went unheard. In Chromium and Firefox, on 58753e4: - words a script took out of a marked phrase and, in a later task, put back left it unmarked (#1); - a second copy of a quote written in its section, with no context to tell the two apart, left the first marked (#1); - a word prepended inside a declared shadow stage a passage runs into left both pieces marked, since the native walker never reached the page's piece before it (#2); - an element inside a passage made contenteditable, which fences it, left it marked, since the watcher reported only text writes and child lists (#3). Each was a mark a fresh resolution rejects, or one it finds that wasn't painted. The page's index of quotes (passages.js, `trackQuotes`) now holds what a quote's resolution depends on: every copy of each quote the threads name, placed or not, and the words a resolution read beside a copy to tell copies apart (`near`). Copies are found by hashing their letters, so one pass over the page finds every quote's copies, where a pattern apiece searched the whole page, once per thread (#4). Between readings the index is carried through the span the two readings differ in (`changedSpan`), which compares the readings themselves, so text, edges, fences and the order the walk reads the page's trees in all count, by the reading's own rules: copies outside the span stand, shifted past it, and the span plus the widest quote's letters before it is searched again. The words watcher no longer interprets which nodes a change touched; it says the reading changed, and which text nodes a change wrote or took out, whose live ranges the DOM moved even where the page then reads the same. Placement places again, after the script, the threads whose quotes the index says changed (`quotesChanged`) and those whose text nodes were rewritten, placed before or not. `runsOn`, the native walker and the per-reading, per-section regex cache go. A thread that comes to stand where the last paint marked nothing for it, and didn't choose to (a resolved thread, a drawing), is painted by a presentation, since only a paint of the page knows where it falls among the marks (anchor-paint.js, `replace`). Overlapping copies still collapse into the first. What changes: the regex's lead consumed its text whether or not the rest of the quote followed, so a lead that failed, or crossed a fence, hid a real copy starting inside it; now only a copy does. This reaches only quotes that overlap themselves. Step 0, a paragraph holding N marked passages, toggling a leading space (Chromium): - origin/main (6cc574a): the edit searches nothing and its next presentation searches each quote over the whole page: 32/512/1,600 searches, 24k/6M/59M characters, 4.8/127/1,077 ms. The merge base (6b3159d) is the same. - 58753e4: the edit runs those searches (reviewer's measure 0.5/7.5/42 ms). - Now: 0 searches; the edit takes 0.75/2.5/6.4 ms, which at 1,600 is re-placing the 1,600 threads whose node the edit rewrote. Pointer moves: 1.17 to 1.27 ms at 512, 3.29 to 3.32 at 1,600; the scaling page's 1,600-section edit 9.0 to 7.1 ms, moves 1.58 to 1.44. - Each script task that changes the page's words now builds the page reading once, for the index to compare: 0.3/2.2/6 ms at 32/512/1,600 sections. A counter redrawn every frame far from any mark costs 1.5 ms more a frame at 512 sections and 5 ms at 1,600. - A presentation on the 1,600-mark paragraph still takes about 0.9 s, on main too: the inventory keys each passage's row by reading its whole block (`passageRow`). - B, threads placed again over 80 moves beside a counter: 0 at 32 and 512 marks. Where travel lands (#5, #6). `passageStart` read a passage's first line down the page, so in vertical-rl it returned one character and `t` left the column at y 765-1165 in a 900 px window, and it took the first segment even where it draws no box, so `t` left a passage whose first words are display:none at y 1,685. It now takes the first segment the browser draws a box for and reads its line along the block axis of its writing mode. Tests, each failing on 58753e4 in Chromium and Firefox: - test_a_mark_whose_words_a_script_puts_back_is_marked_again (#1); - test_a_marked_phrase_a_script_writes_again_is_marked_no_more (#1); - test_words_a_script_puts_inside_a_passage_s_shadow_stage_unmark_it (#2); - test_a_passage_a_script_makes_editable_inside_is_marked_no_more (#3); - test_travel_to_a_thread_shows_the_first_line_its_passage_draws, vertical and hidden start (#5, #6). Runtime: a kept quote answers each of nine changes as a fresh pass does, and the quotes the index says changed are those whose answer did; a change beside a told-apart copy changes its quote. Each fails with the window search, the fence or segment comparison, or the `near` check taken out.
max-sixty
added a commit
that referenced
this pull request
Nov 26, 2026
…s own revision Codex's second review of the bound-file source found these, numbered as it numbered them: - #1: a comment was admitted on a value its widget could never draw. `page check` now refuses an input of another contract than `text-document` that binds a bound file's id (`file-contract`, `data.bound_file_conflicts`), and the door refuses a datum comment naming the value a source holds now where that value holds an error or no input of the section reads its contract (`datum-undrawn-source`). A comment naming a value since replaced is admitted as before. - #3: the source missed a permission removal and a same-size rewrite that put the old modification time back, and its run didn't move. The page's news, the source's cache and its run now read one observation of a bound file, `file_bindings.observed`: its stamp and its change time. Adding the change time to `file_stamp` itself re-parsed revisions in two `test_interact_document` tests, since Leaf hard-links a revision's files and a link moves the change time, so it stays out of `file_stamp`. - #9: a clean editor opened before `leaf file bind` stayed at "No file is bound" until Retry. A failure now holds a file's reads only while it holds a draft or a save whose answer was lost. - #10: a comment recorded a digest of the source's value, which a new label moves. A bound file's source revision is now the first 16 digits of the file's own, the one a save names. Its run digests the observation, path and label, and the served state's tail now sends a source's value again when its revision or its run moves, so a new label reaches the tab. A publication rerun with the same value now sends that value again, where it sent only the run; the tail still sends nothing of the sources a write leaves alone. - #11: `leaf data clear` on a bound file's id deleted the publication behind it. It now refuses the id, as `set` does (`page_data._published`). The public site's first-visit state carried every granted file. It now holds the data the page's markup binds, through the export's filter (`markup_data`). `text-document`'s `revision` is an opaque non-empty string.
max-sixty
added a commit
that referenced
this pull request
Nov 26, 2026
…age data on first visits Codex's review of the previous commit found faults in it, numbered as its findings are: - #1: the door refused a comment a reader genuinely drew. A revision digests a value alone, so the same value republished under another contract read as a contract the seat never drew. The door now refuses only a current reading that holds an error; an input of another contract is left to `page check`. - #3: on Linux two writes can share a change time, so the separate change-time stat still missed a same-size rewrite with the old modification time (35 of 100 cache trials, 86 of 100 news trials), and the hosted publisher's fingerprint (`record_reading`) ignored it. `file_stamp` takes `changed`, which adds the change time from the same stat and settles on the later of the two times, and every reader of a bound file (news, the hosted fingerprint, the source's cache and run) stamps it that way. - #10: comments keep the file's own revision, but the previous commit made the served state's tail resend a publication's unchanged value on every rerun (one 256 KiB rerun grew the answer from 362 bytes to 262 KB), and a validation cached by the file's revision went stale when the label moved. A bound file's whole value now has its own digest, kept with its reading, which the tail compares (`data.value_key`) and validation keys on; the tail's rerun test is back as it was. - #12: the first-visit state dropped a publication only a thread's widget binds, and advertised the version of all data while sending part of it, so a tab naming that version never got the rest. It now holds every source a document or message of the page binds, and the version of exactly those (`page_data.bound_data`), in place of the export's filter, which leaves messages out. - #13 (part): a widget's construction in `leaf page state` said an input of another contract had its value available. It now says it has none, with why. `page check` still finds a file bound under another contract only in the page's own markup, not in a sample's or a message's. - #14: a read failure whose cause the file's stamp doesn't name, such as a symlink in its path, stayed cached after its cause cleared. A source holding an error is now read again each time. - #15: looking up one source for the door read every bound file. It now reads the one it names.
max-sixty
added a commit
that referenced
this pull request
Nov 26, 2026
… and leave drafts off first visits Codex's review of the previous commit confirmed #3 fixed on Linux and macOS and found these still open: - #10: two overlapping state requests could lose a relabel, since a reading the file cache no longer held fell back to the file's revision, which leaves the label out. `data.value_key` now takes the digest kept with that exact reading, and digests any other reading of a bound file afresh; a publication still stands in by its revision, so a rerun sends no value. - #12: first visits held every binding `working_data_bindings` knows, the unpublished source's among them, so a binding only `index.html` holds put its file in the public state. `bound_data` now reads the published revisions and the messages, and not the draft. - #14: a symlink put in a bound file's path and taken out again moved neither the news nor the run, and a file holding bad bytes was read again on every state read. A bound file's observation (`file_bindings.observed`), which the news, the hosted fingerprint and the source's cache all read, now also says whether its path names it without a symlink, so every reading, an error's included, is kept under it. - #15: admission read every publication to learn whether a source was supplied. It now asks for the one source first, and reads the others only where that source holds nothing. Still open, and reported: #1's comment on a file an input of another contract binds after its page was checked, and a contract that pins the file's name, which a new label then breaks; #13's file-contract check, which reaches the page's own markup and not a sample's or a message's; and the copy of a file source into a live sample, which takes a publication's revision.
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.
The composer printed the selected passage back inside itself, right beside the accent-tinted mark the page now paints on that same passage while the box is open. Two statements of one fact, in a box 320px wide.
The quote stays as the fallback rather than the statement: it shows where the mark can't, which is where this version no longer holds the passage. That state is reachable, not hypothetical. A draft survives the version it was written against, so a reviewer who takes the "new version available" chip mid-sentence lands on a page that rewrote the passage out. It gets the panel's detached treatment, dashed and muted, for the same fact.
Out of sight is not gone. A painted mark has no accessibility exposure at all (CLAUDE.md, "Paint; don't wrap"), so the quote stays in the tree as the box's
aria-describedby, which is more than the visible quote ever said: nothing pointed a reader at that.paintAnchorsis the one writer, since it is already where it is known whether the page is showing the passage.openComposerno longer touches the node.anchorLabelnow formats an anchor for the panel and the composer alike.What the removal turned up
placeComposer. Measured in Chrome rather than reasoned: a restored draft reappears just under the banner andrestoreViewputs its passage back where it was, so for a passage near the top of a narrow column every rect of the mark lands inside the box. With the quote gone, nothing said what the draft was about. The box now moves below (or above) a mark it has swallowed whole, reading the geometry offpaintAnchors' own record. Not off every pixel: the box has always covered the tail of a long passage, and that reads fine.cq-uion the quote node. Carrying the description costs it an id, which made it the one piece of injected chrome that could answer "which section of the document is this in" with itself, and the reading position rides on that answer.What is unchanged
The stored anchor,
export's Markdown blockquote, the panel's per-thread quote, and the suggestion box's seed all readanchor.quotefrom the event log, so none of them is touched. Scrolling the passage out of view while composing still leaves the box saying nothing, which is deliberate: the passage is one scroll back, and a quote that came and went with the scroll position would resize the box under the hands typing in it.Verification
81 tests pass, and
check --renderis green. Both states were driven in a real Chrome: a fresh selection (mark painted, no quote, description carrying the passage) and a draft carried onto a version that dropped its passage (quote shown detached, no mark). Five mutations, each caught by a test: droppingplaceComposer, inverting the visibility toggle, droppingcq-ui, dropping thetextContentwrite guard, droppingaria-describedby.🤖 Generated with Claude Code