Repository navigation
Preserve chat scroll position while streaming new messages - #51
Conversation
- only auto-scroll when the user is already near the bottom - centralize near-bottom detection in `chat-scroll.ts` with a 64px threshold - add unit tests covering threshold and edge-case behavior Co-authored-by: codex <codex@users.noreply.github.com>
WalkthroughThis PR adds a scroll detection utility to determine when a chat scroll container is near the bottom, includes comprehensive tests for the utility, and integrates this logic into ChatView to implement conditional auto-scrolling that respects user scroll position. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ChatView
participant ScrollUtil as Scroll Utility
participant DOM
User->>DOM: Scrolls manually
DOM->>ChatView: onScroll event fires
ChatView->>ScrollUtil: isScrollContainerNearBottom()
ScrollUtil->>ScrollUtil: Calculate distance from bottom
ScrollUtil-->>ChatView: Returns boolean
ChatView->>ChatView: Update shouldAutoScrollRef
Note over ChatView: New message arrives
ChatView->>ScrollUtil: isScrollContainerNearBottom()
ScrollUtil-->>ChatView: Returns true (near bottom)
ChatView->>DOM: smoothScrollToBottom()
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Comment |
Greptile SummaryThis PR implements smart auto-scroll behavior for the chat interface that respects user scroll position. Previously, the chat would aggressively scroll to bottom on every message update, disrupting users trying to review earlier messages during streaming responses. Key changes:
Confidence Score: 5/5
Important Files Changed
Flowchartflowchart TD
A[User Action] --> B{Thread Switch?}
B -->|Yes| C[scrollMessagesToBottom - instant]
B -->|No| D{New Message or WorkLog?}
D -->|Yes| E{shouldAutoScrollRef.current?}
E -->|true| F[scrollMessagesToBottom - smooth]
E -->|false| G[No scroll - preserve position]
D -->|No| G
H[onMessagesScroll Event] --> I[isScrollContainerNearBottom]
I --> J{Within 64px of bottom?}
J -->|Yes| K[shouldAutoScrollRef = true]
J -->|No| L[shouldAutoScrollRef = false]
C --> M[Set shouldAutoScrollRef = true]
F --> M
Last reviewed commit: 0476e50 |
Preserve chat scroll position in
|
Two tasks in one commit because both edit ChatView.tsx and cannot be separated by pathspec. DIFF AS A DOCK PANEL (pingdotgg#56). Part B of our own frozen spec, deferred since Part A shipped. The app had TWO tab systems on screen -- the dockview grid, and a second tab set inside the single chat panel. Diff moves first because it already resolved its own thread identity from the URL rather than taking it from ChatView's scope; the other three take a dozen callbacks each and will need rewriting. The structural problem worth recording: ChatView is a DESCENDANT of the dock (ChatDock -> ChatPanel -> ChatView), so the components that need to open a panel cannot receive a ref to the thing containing them. Solved with a module-scope handle registered on mount and cleared on unmount, matching the two singletons already in that file. It warns loudly rather than no-opping silently when null. THE MIGRATION IS PROVEN COMPLETE, NOT ASSERTED. A review found Cmd/Ctrl+D still driving the old store -- and because the render case had been correctly removed while the tab strip still knew how to draw a Diff tab, the shortcut produced a VISIBLE TAB THAT RENDERED NOTHING. Third instance of "looks wired, does nothing" in this repo. The fix was not to patch two call sites. `"diff"` is gone from RightPanelKind and RightPanelSurface, so the compiler enumerated every straggler: exactly six, across two files, all genuinely dead. This is the template for Files, Terminal and Browser -- move the surface, delete its kind, and completeness becomes a build error rather than something a human eyeballed. The one place that must still recognise the retired kind is the persistence migration, which casts past the union with a comment explaining that handling data older than the current type is its entire job. Cmd+D also lost its toggle in the first pass -- open-and-focus with no close. The lane flagged it rather than letting me find it. Not accepted: the keybinding is named `diff.toggle`, the handler is named onToggleDiff, and "use the tab x" defeats the point of a keyboard shortcut. Now a genuine toggle, with the CLOSE half specifically mutation-proven, because a toggle that only ever opens is the exact bug being fixed. The layout-persistence risk was checked rather than assumed: `persist()` stamps knownPanelIds from the current catalog on every save, so a close survives reload as "closed on purpose" instead of being re-grafted. Storage v7->8 strips persisted "diff" surfaces, and recomputes `isOpen` from surviving surfaces -- without that, a user whose ONLY surface was diff resumed into an empty right panel they never asked for. Invisible to the first test because its fixture always had a second surface. THREE.JS PLAY (pingdotgg#51). `autoOpenPreview` has been declared in contracts, collected by the settings form, and persisted to disk since it was written -- and nothing ever read it. A user could tick the box, save, and nothing happened. It now opens the preview when a script with a previewUrl starts. It waits for the port scanner to report a listener attributed BY PID to the exact terminal the script ran in, then opens the CONFIGURED url rather than the scanner's reported one -- those differ when a port gets bumped, and the user configured what they configured. Guarded on desktop before anything starts, so in a browser it genuinely does nothing rather than failing gracefully. Its mutation proof is the right shape: deleting the open call while still returning `opened: true` turns the test red with zero calls to the mock -- the exact "looks wired, does nothing" shape this task exists to fix, reproduced deliberately to prove the test catches it. Full typecheck, npm test and fmt:check green. Live browser E2E is an OPEN GATE, tracked for pingdotgg#55 -- the dock is half migrated, so a live pass today would measure a transitional state.
…gdotgg#58) * feat(settings): build the Secrets administration page in T3 Replace the Secrets NotInT3Yet placeholder with a real panel: a Global and a Personal section, each listing its scope's secrets with an enable switch, edit, and delete, plus a create/edit dialog. Reads go through the shared moatless query helpers keyed under `secrets/{scope}`, so a write invalidates both scopes together. The row-derivation logic (kind labels, active-first ordering) lives in a pure `secretRows.ts` with co-located tests; the panel only reads atoms and renders T3's own settings primitives. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(settings): build the Users administration page in T3 Replace the Users NotInT3Yet placeholder with a list and a detail page. The list shows everyone with an account — monogram, name, admin and bot tags — and leads to one user's page. The detail page edits name, email, and the global role with dirty tracking and an explicit save, and shows the read-only account identity beneath it. There is no single-user read on the wire, so the detail page reads the same list the index does and finds its login in it; the two share the `users` key so a role change refetches both at once. Row derivation (display name, monogram, humans-before-bots ordering) is a pure `userRows.ts` with co-located tests. The detail route uses the trailing-underscore file form so it does not nest under the list route, and is recorded in the merge inventory. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(settings): build the Moatless Loops administration pages in T3 Add the Loops list and Loop detail settings surfaces, replacing the NotInT3Yet placeholders. The list shows each loop's state, git provenance and source summary, and links to a detail page that edits the loop's general fields, configuration and schedule with the workspace SaveBar pattern, exposes lifecycle actions (pause/resume/approve-and-activate), git override/restore, and delete. Source derivation and provenance live in a pure `loopRows.ts` module with co-located tests. Detail route uses the underscore form to avoid nested-route rendering. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(settings): build the Moatless Integrations administration page in T3 Replace the NotInT3Yet placeholder on /settings/integrations with a panel of three sections: Connections (adapter connections a loop can subscribe to — listed, created, and opened to a detail page that removes them), Apps (the configured adapter apps and which of each app's secrets are set, read-only), and GitHub (registered GitHub apps, their installations and the default installation, read-only). Naming, ordering and secret fingerprint derivation live in a pure integrationRows.ts module with co-located tests. Connection detail route uses the underscore form to avoid nested-route rendering. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(settings): administer skills plugins and their activation in T3 Adds the Skills administration surface: a plugin catalog and, per plugin, the skills it sources with a control for the deployment-wide default and the viewer's own override, side by side. The delivered badge is read straight from /plugins/effective rather than recomputed from the two controls — off-for-everyone-plus-on-for-you is the server's call to resolve, so a skill can read "Not set / Not set" and still be Delivered because its plugin is on. Precedence lives in skillRows.ts behind a test that pins the source-off-with-skill-on and unset-versus-off cases. Detail route uses the underscore form so it does not nest under the list panel. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(spec): mark moatless-admin spec in review and correct stale claims All five administration surfaces are now built and under review as PRs pingdotgg#51–pingdotgg#55, so the spec no longer reads "in progress". Records the merge order the shared queries.ts forces, and the two follow-ups that land once the five merge (delete NotInT3Yet, move this spec to .plans/completed/). Also fixes two claims that drifted from what shipped: the acceptance criterion still said the not-built placeholder links into the SPA, which the placeholder decision earlier in the same doc deliberately reversed; and two seam-table module paths pointed at apps/web/src/moatless/ rather than where the pure modules actually landed under components/settings/moatless/. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(spec): unbreak the surfaces table split by the route-convention note The trailing-underscore route-convention paragraph sat between two table rows, so Markdown ended the table at it and rendered every row below — loops through users, ten of the twelve surfaces — as literal pipes. Move the paragraph below the last row so the table stays one block. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore(settings): retire the NotInT3Yet placeholder and archive the spec Every administration surface now has a real panel, so no route renders the placeholder. Its own comment said to delete the file when the last usage went; this is that moment. The merge-inventory row stops describing a build where some entries lead to a placeholder. Neither of these could be done while the surfaces were five separate branches — each still needed the placeholder for the other four. Combining them into one change is what makes both possible, so they land here. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(fork): list the merge inventory as entries, not tables The inventory conflicted on every branch that touched it, and almost none of that was disagreement. The formatter re-pads a Markdown table across all of its rows when one cell changes width, so adding a single route path to the administration-pages row rewrote all 60 lines of the block; two branches editing two unrelated entries then conflicted on every line between them. Measured on this file, adding one route path to the administration pages: 60 changed lines as a table, 1 as a list. So the tables are gone. Every section is a list of entries: a title line, an optional nested `Paths:` list with one path per line, and the rule. The formatter leaves list items and prose alone — verified by running `vp fmt` over the result and getting a byte-identical file back. The header paragraph says so, so this does not get turned back into a table. Content is carried over unchanged. Verified by extracting every backticked path from both versions: 117 before, 117 after, none lost and none invented. Three deliberate edits beside the reformat: - "the three fork plans above" now says four; that entry has listed four plans since the administration spec was archived. - "row" means a table row, and there are no tables now, so policy entries and the skill's vocabulary say "entry" — including the `decide, then add an entry` policy value the skill defines. - `.agents/skills/fork-upstream-merge/**` gets a path-policy entry. It is fork-authored and was in no entry at all; upstream owns the other four skills under `.agents/skills/` and adds more, so a blanket `ours` there would be wrong. Checked against a shallow `upstream/main` fetch, which also confirmed the two counts this file quotes are still current: 32 of 36 `.plans/` files and 34 of 39 under `apps/web/src/browser/`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
dev.sh install: build only the app, server and web client
ci(fork): typecheck and test the machine map alone when only it changes
… settled with -X ours' (pingdotgg#51) from T3CODE-33-sync-repair into custom-local
…hown in Lineage' (pingdotgg#51) from feat/lineage-superseded-by into dev
…ckaging Port built-in pstack from scriptedalchemy/main (PRs pingdotgg#8, pingdotgg#12, pingdotgg#20, pingdotgg#25, pingdotgg#26, pingdotgg#27, pingdotgg#38, pingdotgg#46, pingdotgg#51, pingdotgg#102, pingdotgg#117, pingdotgg#153) onto current main. - packages/pstack (snapshot 0.15.43-t3code.1), shared/pstack, server pstack module and client-runtime providerSkills taken verbatim from the fork. - Server: PstackPack layer, composer expansion on turn start and steer, pstack catalog in server config and live pstackUpdated snapshots, orchestrationTargets helpers shared with the MCP service, driverKind targets prefer instances advertising the requested model and options, orchestrator_capabilities allModels for setup-pstack, and native pstack@<marketplace> plugins switched off in Claude and Codex sessions. - pstackEnabled is on by default; toggle lives in Settings > Labs on web and mobile, with i18n for all locales. - Packaging: CLI build, CLI archive, desktop artifact, WSL tree and desktop backend carry the pack and point the server at it. Adapted to main: no provider cooldowns or inference routes upstream, so role resolution uses providerConstraints and the retired-route migration and its tests are dropped; turn start expands only messages that reference pstack; fork-only linked-delegation driverKind refusal is not ported because main resolves driverKind remotely. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JSX text like <p>T&pingdotgg#51; is ready</p> shows "T3 is ready", and so does the page shell's "T&pingdotgg#51;", but the guard read both as written. JSX text is now decoded the way the build does before the rename; the page shell, renamed as written, is decoded after. Unit-tested with decimal and hex references. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A browser shows "T&pingdotgg#51 server" as "T3 server", though the reference has no semicolon, but the guard's page decoder required one. Numeric references now decode either way; unit-tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
<p title="T&pingdotgg#51; is ready" /> ships the title "T3 is ready", as the JSX transform and Babel decode attribute strings, but the guard read it as written. One decoder now runs JSX text, attribute strings and a page's references through TypeScript's JSX transform; unit-tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…23) (#20) * fix: name the app V3 Studio where upstream's text calls it "T3" (GEN-23) Interface text, CLI help, MCP tool titles and descriptions, errors and agent notices called the app "T3" ("Create T3 threads", "This T3 home is unavailable", "Restart the T3 server"). The build's rename now swaps a list of exact phrases (UPSTREAM_SHORTHAND in the shared brand module) to "V3 Studio" in the web, desktop and server bundles and the mobile Babel pass, never a bare "T3", so `T3.workflow`, `-Namespace T3`, T3 Connect, T3 Chat and the T3 account stay. Translations of the messages whose English uses a phrase are renamed with them, compounds included ("V3-Studio-Threads", Swedish "V3 Studios"). A test reads the shipped source and fails on any "T3" the list neither renames nor names as kept, so upstream's new text shows up in syncs. Settings' sample thread rows show a project "v3studio" with a "V3" tile, a source edit since a bare "T3" can't be swapped safely. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep the shorthand list working in mobile builds, and leave mixed messages' translations - The mobile Babel pass also reads the shared brand module, so it renamed the phrase list's own entries ("T3 thread" became "V3 Studio thread") and mobile's runtime catalog pass stopped renaming translations. The list now writes `{T3}` for the shorthand, which no rename matches. Tests run the module through the Babel pass and through a bundle. - A translation is renamed only when every "T3" in its English names the app. A message that also keeps a "T3" (`T3.workflow`, the relay client, T3 Connect) is left as translated, since no rule can tell its "T3"s apart, and a test fails if one appears in the catalogs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: quote the bundled brand module's path, and share the catalog's shorthand checks - The bundle test wrote a native path into a module specifier unquoted, so a Windows path's backslashes read as escapes; it is written as JSON now. - rebrandCatalog and mixedShorthandMessages test "names the shorthand" and "keeps a T3" through the same two helpers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: say what a mixed message's translations get, and test it A message that names the app by a listed phrase beside a "T3" that stays has its translations' listed phrases renamed, as English does; only the broader rename (compounds, a bare "T3") is skipped. The comment said they were left as they are; it says so now, and a test pins a translation that uses the English phrase itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: build the untranslated mixed message's key from its own text The test took the key from an array index, which strict indexing types as possibly undefined, so typecheck failed in CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep T3 Tools' services in translations, and match kept names whole in the guard - A translation of a message named only by the shorthand renamed every bare "T3", so one that also named T3 Connect, T3 Chat, the relay client or `T3.workflow` where its English didn't would get "V3 Studio Connect". Those names stay now. - The shipped-source check took a kept name as any substring, so new text such as "T3 Toolshed" passed as "T3 Tools". Kept names must end at a word boundary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep inflected service names in translations, and check the GNOME extension's text as shipped - A translation's "T3 Connects" (Swedish genitive) or "T3-Connections" slipped past the kept names, which had to end at a word boundary; any form of T3 Tools' service names stays now. - The GNOME extension ships as written, with no rename pass, so the shipped-source check no longer lets a listed phrase excuse its text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: rename a translation's T3 only where it says it no more often than its English names the app A translation that also names code or a T3 Tools service, where its English doesn't, keeps every "T3" as translated, and a test over the shipped catalogs flags any such message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: check the strings in the Pi extension's source, leaving out only its line comments The guard skipped the file whole, so a new shorthand in a notice or tool description the agent reads passed unseen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: leave a translation naming a kept T3 as translated, and check the GNOME extension's metadata The count gate counted "T3" after the listed phrases were renamed, so a kept name such as T3.workflow could take the freed count and be renamed. It now counts the translation as written, less upstream's full name, and leaves any translation naming a kept "T3" alone. The kept names move to the shared brand module, and a test over the shipped catalogs checks that each survives. The guard also reads the metadata the GNOME extension's bundle ships, which GNOME shows as written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: know a kept T3 in any form a translation writes it, and credit upstream's plain name only as written A translation that inflects or joins a kept name ("T3 Connects", "T3-Connections") is now left as translated even where its count matches its English's phrases, and upstream's name kept with a no-break space is neither counted nor renamed. The guard took upstream's full name with a plain space as kept everywhere, so a "T3\nCode" the rename misses passed; only text that ships as written may credit it so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: check the page shell and the mobile app config, and know a kept name capitalised The guard never read apps/web/index.html or apps/mobile/app.config.ts, which the build renames and users see (the page title, the app name, the OS permission prompts). A translation's "T3-Relay" now counts as the kept relay client, as "T3-Connections" already did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: know a kept T3 in a translation however it is spaced "}=T3;" and "T3 Connects" didn't match the kept names' listed spacing, so a translation whose count tied was renamed. Each space in a kept name now stands for any run of spaces or hyphens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: check the desktop build's text, its permission prompts and description scripts/build-desktop-artifact.ts holds the macOS permission prompts, the product name and the package description, which the build renames and users see. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: take any dash a translation writes for a hyphen, in kept names and compounds A kept name joined with a non-breaking hyphen ("T3‑Connect") or a soft hyphen wasn't known, so a translation whose count tied had it renamed. A compound so joined ("T3‑Threads") now keeps its hyphen when renamed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: take any dash for a kept name's own hyphens too Only the spaces of a kept name took any dash, so a translation writing "T3‑Head‑Moved‑At" or "T3‑Mode‑Limit" with non-breaking hyphens wasn't known and, on a tie, was renamed. Each hyphen now matches as a space does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: rename upstream's compound name joined with any dash A translation's "T3‑Code" with a non-breaking hyphen kept upstream's name, and the count took it for the shorthand, so a translation such as "Öppna T3‑Code i detta T3‑hem" was left whole. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: check the desktop app's product name apps/desktop/package.json's productName becomes the desktop app's name through the build's rename, and the guard never read it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: match kept names token by token, and keep T3 joined to any letter, digit or dash A kept name now matches as its words and marks with any spaces, dashes or soft hyphens between them ("} = T3 ;"), rather than variant by variant. The phrases, their mobile mirror and the translation rename take "T3" as joined to what comes before it after any dash or a letter of a spaced alphabet ("X‑T3 thread", "ÄT3 home"), not only an ASCII word character or hyphen. What follows stays as it was, so Korean particles and Japanese text after "T3" still rename. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: take a combining mark before T3 as joining it to the word "CaféT3 thread", the decomposed spelling of "CaféT3 thread", was renamed while the composed one wasn't: U+0301 belongs to no script. JOINS_T3 now includes combining marks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor: build the phrase pattern with the shared escape, and read shipped files through one helper No change in behaviour: the phrase pattern's source is unchanged (the mobile mirror's equality test holds) and the catalogs render byte for byte as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: parse every shipped file in the guard, so an escaped T3 can't hide The guard skipped any file whose raw text had no "T3", so a literal like "T3 is ready" shipped as "T3 is ready" unchecked. Each file is now parsed and its strings read as they ship; the per-file scan is a function with a unit test for the escape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: decode character references before the guard reads shipped text JSX text like <p>T&pingdotgg#51; is ready</p> shows "T3 is ready", and so does the page shell's "T&pingdotgg#51;", but the guard read both as written. JSX text is now decoded the way the build does before the rename; the page shell, renamed as written, is decoded after. Unit-tested with decimal and hex references. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: have the guard read every page the web build ships The web build has two HTML entries, the app's shell and the EPUB viewer, and renames both whole, but the guard read only index.html. It now reads every apps/web/*.html, decoding character references after the rename. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: decode a page's numeric references without their semicolon A browser shows "T&pingdotgg#51 server" as "T3 server", though the reference has no semicolon, but the guard's page decoder required one. Numeric references now decode either way; unit-tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: decode character references in JSX attributes for the guard <p title="T&pingdotgg#51; is ready" /> ships the title "T3 is ready", as the JSX transform and Babel decode attribute strings, but the guard read it as written. One decoder now runs JSX text, attribute strings and a page's references through TypeScript's JSX transform; unit-tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: read a page as it shows: inline scripts parsed, references decoded A page is renamed as written. A browser then shows "T3 server" as "T3 server", which TypeScript's JSX decoder leaves as written, and an inline script's "T3 thread" as "T3 thread" once it runs. The guard now decodes a page's numeric references by code point, either "x", with or without the semicolon, and reads each inline script's strings with the same parser as shipped source. Unit-tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: end a page's script tag outside quoted attributes, and state the guard's reach <script data-note="1 > 0"> ended at the quoted ">", so the guard parsed the wrong script body and missed an escaped "T3" in it. The tag now ends at the first ">" outside a quoted attribute value; unit-tested. The guard's doc now says what it doesn't do: run code or render styles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: read shipped JavaScript as JSX in the guard A .js file was parsed as TypeScript without JSX, so <p>T3 is ready</p> in a mobile .js component, which Metro builds, was never read. .js and .mjs files are now parsed as JSX; unit-tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: flag an inflected T3 in the guard and the catalog test Both checks ended with \bT3\b, so "Restart your T3s", which no phrase renames, passed. They now flag "T3" unless a capital, digit or underscore follows, as in the code names that stay (T3CODE_HOME, T3DeviceStream); unit-tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: have the guard read every script file kind the builds compile The guard's globs took only .ts, .tsx, .js and .mjs, so a .jsx component, which Metro and the web build compile, went unread. It now reads .mts, .cts, .jsx and .cjs too, JavaScript as JSX; unit-tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: let the catalog test take upstream's name with a no-break space The rename keeps "T3 Code" in a translation on purpose, but the catalog test flagged any "T3" left, so "T3-Threads, auf Basis von T3 Code" couldn't ship. The test and the source guard now share one check for a "T3" left in renamed text; the catalog check is a function, unit-tested with that translation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: know a kept name a translation writes in capitals KEPT_T3_STEM let only each word's first letter vary in case, so "T3 CONNECT" wasn't known as T3 Connect and was renamed on a tie. Every letter of a kept word but "T3" now matches either case, so the command "t3 connect" still renames; unit-tested. Shipped catalogs are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
isScrollContainerNearBottomutility to detect whether the messages container is close enough to the bottom to auto-scrollChatViewwithshouldAutoScrollRefand anonScrollhandlerscrollTop/scrollIntoViewcalls with a sharedscrollMessagesToBottomhelperchat-scroll.test.tsTesting
apps/web/src/chat-scroll.test.ts: verifies near-bottom detection at bottom, within threshold, above threshold, negative threshold clamping, andNaNfallbackSummary by CodeRabbit
New Features
Tests