Registry Mirror
Skip to content

Conversation

@KiritoXDone

Copy link
Copy Markdown
Contributor

Problem

An agent reading an EPUB gate map receives both Gate 12 and the superseded Gate 4 when the map is a standalone SVG chapter. Chromium shows only Gate 12. Embedding the same SVG in an XHTML chapter already produces the correct attachment text.

Change

Apply the worker’s existing inline display:none !important check to SVG-rooted chapters as well as XHTML chapters. The regression case covers a hidden group and a visible label whose last important declaration restores its display.

Closes #48023.

Verification

I ran the production attachment command on macOS 26.2 with Node 26.13.1 at base 358cc548f7 and head 8c50d5dea6, using the same EPUB. EPUBCheck 5.4.0 reported zero errors and warnings. Chromium rendered Gate 12 and the 09:30 departure in both chapters.

Attachment command stdout Base Head
Chapter 1, SVG inside XHTML Gate 12, 09:30 Gate 12, 09:30
Chapter 2, standalone SVG Gate 12, Gate 4, 09:30 Gate 12, 09:30

Reproduce on Linux or macOS

From either checkout with dependencies installed, these commands retrieve the public fixture generator, print the archive hash, and invoke the actual server command. I repeated this using the published issue and verified that it generated the original archive byte for byte.

proof_dir=$(mktemp -d)
curl -fsSL https://github.com/_gh/api/repos/pingdotgg/t3code/issues/48023 |
  python3 -c 'import json,sys; print(json.load(sys.stdin)["body"].split("`" * 3 + "python\n", 1)[1].split("\n" + "`" * 3, 1)[0])' > "$proof_dir/repro.py"
python3 "$proof_dir/repro.py"
python3 -c 'import hashlib,sys; print(hashlib.sha256(open(sys.argv[1],"rb").read()).hexdigest())' "$proof_dir/gates.epub"
node apps/server/src/bin.ts __document-text "$proof_dir/gates.epub" .epub

Expected SHA-256: 046014ae96b31f35f0359a06094a1a5e03bfdb1b010954896aebcc74f4cf7bb2. The issue contains the original stdout. Head stdout:

## Chapter 1

  Board at Gate 12.
  
  Departure 09:30.

## Chapter 2

  Board at Gate 12.
  
  Departure 09:30.

The new assertion failed on base because the hidden label was present. All 70 cases in the attachment test file passed on head. vp run check:changed passed, including 77 tests across three files.

GPT-6.2 Astra via the Codex harness in T3 Code.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Dec 3, 2026
@macroscopeapp

macroscopeapp Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 8c50d5d

Macroscope's review found this PR approvable — EPUB extraction now omits explicitly hidden labels in standalone SVG maps, matching existing HTML visibility filtering. The change is confined to extracted text and introduces no operational or persistent-data changes.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 8c50d5d and 1e4d016.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The EPUB text worker now applies visibility checks to standalone SVG documents. The SVG extraction test adds a hidden group and checks that its text is not extracted.

Changes: EPUB visibility checks

Layer / File(s) Summary
Visibility checks and extraction test
apps/server/src/provider/documentTextWorker.ts, apps/server/src/provider/userInputAttachments.test.ts
The worker records the EPUB root element and applies hidden-attribute suppression to EPUB HTML documents, with until-found exempt. Important display: none suppression now applies to EPUB documents with either an html or svg root. The SVG test adds hidden text and checks that it is absent from extraction.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: jadelike-wine, only21mil

Merge Risk: Minimal · previous review 8c50d

Standalone SVG chapters in EPUB attachments now omit text inside groups hidden with display:none !important, matching XHTML chapters. The regression test covers the hidden label and a visible label whose display is restored. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(server): omit hidden labels from standalone EPUB maps" matches the main change. The diff extends the existing display:none !important suppression in documentTextWorker.ts to SVG-rooted …
Description check Passed The description follows the template structure with Problem, Change, Scope, and Verification sections. It explains the bug (superseded Gate 4 appears for standalone SVG chapters), the fix (apply the e…
Linked Issues check Passed [#48023] The issue asks that standalone SVG EPUB chapters omit labels inside a display:none !important group, while keeping visible labels. In documentTextWorker.ts, the existing `hasImportantDispla…
Out of Scope Changes check Passed The changed files are documentTextWorker.ts and userInputAttachments.test.ts. The worker change is limited to the EPUB suppression condition. It adds an epubRoot variable and extends the existing `d…
Full details: Title check

Explanation

The title "fix(server): omit hidden labels from standalone EPUB maps" matches the main change. The diff extends the existing display:none !important suppression in documentTextWorker.ts to SVG-rooted EPUB chapters, so hidden labels in standalone SVG maps are omitted. The title is specific, follows conventional commit format, and does not list files.

Full details: Description check

Explanation

The description follows the template structure with Problem, Change, Scope, and Verification sections. It explains the bug (superseded Gate 4 appears for standalone SVG chapters), the fix (apply the existing display:none !important check to SVG-rooted chapters), and links issue #48023 in Scope. Verification gives focused test results, a production-command comparison with base and head output, and a reproduction path. The template's Scope section asks for a linked issue, and this is provided. Minor gaps: the Scope section does not explicitly address why the change is a bug fix rather than a feature, and the template's note about the agent model and harness is present but the description also includes extra detail beyond the template. These gaps are non-critical.

Full details: Linked Issues check

Explanation

[#48023] The issue asks that standalone SVG EPUB chapters omit labels inside a display:none !important group, while keeping visible labels. In documentTextWorker.ts, the existing hasImportantDisplayNone(tag.attributes.style) check now applies when epubRoot is svg as well as html. The diff computes epubRoot from stack[1] ?? node for .epub documents, so the SVG root case reaches the same suppression path as XHTML. The test change in userInputAttachments.test.ts adds a display:none !important group containing "Superseded gate" to the standalone SVG fixture and expects it to be absent. It also adds a display:none!important;display:inline!important text, "Standalone chart", and the expected list keeps it. This matches the issue's visible-control case. The PR does not change rendering or XHTML extraction. The author reports that the new assertion failed on base and that all 70 attachment test cases passed on head. I did not run the tests. The result rests on the diff and the reported test outcome. The hidden attribute check remains limited to html roots. The issue does not request a change there.

Full details: Out of Scope Changes check

Explanation

The changed files are documentTextWorker.ts and userInputAttachments.test.ts. The worker change is limited to the EPUB suppression condition. It adds an epubRoot variable and extends the existing display:none !important check from html roots to svg roots. The hidden attribute check and the separate SVG metadata suppression keep their prior behavior for each root type. The test change adds a fixture and expected-absence entry for the same behavior. No unrelated files or refactors appear in the reviewed diff. The PR description's EPUBCheck, Chromium, and reproduction results are supporting evidence and were not re-run.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3fa4291 and 8c50d5d.

Files selected for processing: 2

  • apps/server/src/provider/documentTextWorker.ts
  • apps/server/src/provider/userInputAttachments.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Dec 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Manually verified in the real web app: Chrome 158 on Linux, 1440×900 CSS pixels, DPR 2, dark theme, fresh isolated databases and the same synthetic project/thread on each commit.

  1. Generate and attach the identical gates.epub from #48023.
  2. Submit “Quote the boarding gate and departure from each chapter of gates.epub.” using Replay (dev).
  3. Copy the real upload's extracted-text sidecar unchanged into a Markdown file and open it beside the sent attachment. The right panel below shows extraction output; the replay reply is not used as evidence.
Before After
Before: standalone Chapter 2 includes hidden Gate 4
fc65ae0380
After: both chapters contain only Gate 12 and Departure 09:30
1e4d016c33
Chapter 2 includes Gate 4 alongside Gate 12. Chapter 1 is correct. Both chapters contain Gate 12 and Departure 09:30, without Gate 4.
Recording · Raw attachment extraction Recording · Raw attachment extraction

Both stills were inspected and were pixel-identical across captures 500 ms apart.

Fixture generator · State seed script · Upload inspection script · Attempted scenario (uncommitted; the runner reproduced the base failure but stopped at head file-picker navigation, so the final comparison was captured manually).

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Dec 3, 2026
@juliusmarminge
juliusmarminge merged commit edd5440 into pingdotgg:main Dec 3, 2026
56 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Dec 3, 2026
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Dec 3, 2026
**v0.1.14-nightly.20261203.5651** · 87 changes from 17 contributors

- **Antigravity MCP tools.** Use configured MCP servers in Antigravity threads and delegated tasks, including on the first turn.
- **ClinePass models.** Start threads and delegated tasks with models that appear after selecting their provider.
- **Desktop updates.** See available app updates and update servers to their latest releases.
- **Partial commits.** Hook edits staged during a partial commit no longer risk being reverted in a later commit.
- **Draft dictation.** Keep in-progress dictation when changing a draft's project.
- **Worktree cleanup.** Remove desktop worktrees even when their dependencies include Electron.

### Plus 72 more bug fixes.

<details>
<summary>Full changelog</summary>

## What's Changed
* fix(dev): keep watching after an existing nested source directory is swapped by @saphid in pingdotgg/t3code#47863
* fix(shared): quoted thread search no longer matches the start of a longer accented word by @StiensWout in pingdotgg/t3code#47849
* fix(web): archive preview keeps keyboard focus when navigating by @only21mil in pingdotgg/t3code#47854
* chore(vouch): denounce ndycode by @juliusmarminge in pingdotgg/t3code#47928
* fix(shared): ignore backticks in link titles when labeling file chips by @saphid in pingdotgg/t3code#47871
* fix(mobile): translate the 'unavailable' suffix on missing context chips in the composer by @saphid in pingdotgg/t3code#47866
* fix(mobile): keep CR-delimited code fences from closing chat folds early by @saphid in pingdotgg/t3code#47865
* fix(web): keep escaped-bracket footnotes across PR attachments by @saphid in pingdotgg/t3code#47870
* fix(web): long Pull Requests URL and saved filters no longer end in half a flag or joined emoji by @tiliakoos in pingdotgg/t3code#47907
* fix(acp): Antigravity threads keep the user's HTTP MCP servers by @juliusmarminge in pingdotgg/t3code#47463
* fix(shared): link bare prose absolute file paths that end with #L line anchors by @saphid in pingdotgg/t3code#47900
* feat(mobile): iOS terminal runs on official libghostty-vt, like web and Android by @juliusmarminge in pingdotgg/t3code#47914
* fix(web): show no date for a ZIP member whose date was never set by @iamshadmantaqi in pingdotgg/t3code#47908
* fix(web): preserve dictation when moving a draft by @peakoshi in pingdotgg/t3code#47883
* fix(server): Antigravity threads load your global MCP servers from ~/.gemini by @t3dotgg in pingdotgg/t3code#47994
* fix(mobile): dragging in the focused composer selects text instead of going back by @juliusmarminge in pingdotgg/t3code#44048
* fix(preview): stalled remote browser links no longer get stuck in fast frame pipelining by @saphid in pingdotgg/t3code#47912
* fix(mobile): zoomed Android PDF tiles no longer flicker when the cache is full by @juliusmarminge in pingdotgg/t3code#45408
* fix(mobile): create worktrees from the exact base branch by @saphid in pingdotgg/t3code#47918
* fix(mobile): holding delete in the iOS terminal keeps deleting by @juliusmarminge in pingdotgg/t3code#46951
* fix(server): WorkflowForgeError keeps the underlying error as cause by @Kamo2323 in pingdotgg/t3code#47910
* fix(web): keep PR footnote numbering after a BOM-prefixed code fence by @saphid in pingdotgg/t3code#47919
* fix(server): read the full shared-string index in XLSX attachments by @KiritoXDone in pingdotgg/t3code#47937
* fix(mobile): render inline SVG data URLs with uppercase scheme or MIME type by @saphid in pingdotgg/t3code#47832
* fix(web): Workflows waits for the first connection and stops hanging on a pane link with no run by @juliusmarminge in pingdotgg/t3code#47997
* fix(mobile): iOS math that fails to parse wraps instead of cutting off by @juliusmarminge in pingdotgg/t3code#44813
* fix(server): worktree removal in the desktop app deletes folders holding Electron's .asar files by @juliusmarminge in pingdotgg/t3code#48001
* fix(mobile): dragging the conversation dismisses the keyboard on iOS by @juliusmarminge in pingdotgg/t3code#47170
* fix(mobile): ignore quoted HTML attributes when linking PR references by @saphid in pingdotgg/t3code#47931
* fix(forgejo): treat pull requests from deleted forks as cross-repository by @saphid in pingdotgg/t3code#47947
* fix: a waiting workflow question keeps focus and its typed reason when the run's steps load by @juliusmarminge in pingdotgg/t3code#47995
* fix(desktop): app updates stay visible and are found within the hour by @t3dotgg in pingdotgg/t3code#47132
* fix(server): honor directory-only ignore rules for names ending in a backslash by @saphid in pingdotgg/t3code#47952
* fix(server): honor full-segment globstars with extra stars in workspace ignore rules by @saphid in pingdotgg/t3code#47962
* fix(chat): only open chat folds for an actual open attribute by @saphid in pingdotgg/t3code#47923
* fix(web): copy literal invalid follow-ups without rewriting nested citations by @saphid in pingdotgg/t3code#47967
* fix(client-runtime): highlight Node eval scripts after warning and unhandled-rejection options by @Pruthvirajcodes in pingdotgg/t3code#47966
* fix(web): reset reopened empty drafts to the project model by @shivamhwp in pingdotgg/t3code#47951
* fix(usage): skip out-of-range transcript timestamps instead of failing the daily summary by @saphid in pingdotgg/t3code#47972
* test(web): clear IndexedDB between browser test files by @juliusmarminge in pingdotgg/t3code#48020
* test(web): fake driver waits for session ready like the real one by @juliusmarminge in pingdotgg/t3code#48029
* fix(web): Update everything moves servers to the newest release, not the last one the app found by @t3dotgg in pingdotgg/t3code#47141
* fix(server): Antigravity delegates get your MCP tools on the first turn by @t3dotgg in pingdotgg/t3code#48019
* fix(server): let workflows open signal waits with an infinite timeout by @saphid in pingdotgg/t3code#47973
* fix(usage): preserve trailing spaces in transcript source identity by @saphid in pingdotgg/t3code#47971
* fix(mobile): show the generic file icon for filenames ending in .constructor by @saphid in pingdotgg/t3code#47976
* fix(web): busy fork button stops pulsing when reduced motion is enabled by @flamboh in pingdotgg/t3code#47983
* chore(server): start T3 Connect tunnels in cloudflared's post-quantum mode by @maria-rcks in pingdotgg/t3code#48046
* fix(mobile): let escaped backticks stay literal when finding chat fold boundaries by @saphid in pingdotgg/t3code#47977
* fix(web): keep explicit table sections outside implicit row groups by @saphid in pingdotgg/t3code#47984
* fix(usage): stop model aliases from corrupting bucket source paths by @saphid in pingdotgg/t3code#47992
* fix(web): copied headings keep a trailing # sign by @saphid in pingdotgg/t3code#47998
* fix(server): do not treat malformed ignore character classes as literal paths by @saphid in pingdotgg/t3code#47974
* fix(web): keep indented code blocks on the next line of a list item in CR-only Markdown by @saphid in pingdotgg/t3code#47993
* fix(web): PR and issue sections keep open state across right-panel tab switches by @only21mil in pingdotgg/t3code#47985
* fix(mobile): strip carriage returns from HTML link and image URLs by @saphid in pingdotgg/t3code#47991
* fix(contracts): preserve literal Git repository and worktree paths by @saphid in pingdotgg/t3code#48000
* fix(web): PDF page and zoom buttons keep keyboard focus at limits by @only21mil in pingdotgg/t3code#48004
* fix(web): keep the Usage chart tooltip on the hovered bucket when the period changes by @saphid in pingdotgg/t3code#48012
* fix(shared): keep angle brackets literal in sent file mention labels by @saphid in pingdotgg/t3code#47986
* fix(mobile): keep healthy pull request pages when another repository fails by @saphid in pingdotgg/t3code#47989
* fix(web): IME typing no longer triggers app shortcuts by @tiliakoos in pingdotgg/t3code#48010
* fix(shared): count emitted JavaScript and declaration maps as generated changes by @saphid in pingdotgg/t3code#48022
* fix(web): PR pickers and menus hold the panel still while open by @flamboh in pingdotgg/t3code#47800
* fix(shared): keep short diff-like PR heading links in the summary by @saphid in pingdotgg/t3code#48017
* fix(web): Escape cancels a sidebar drag without leaving Pull Requests by @StiensWout in pingdotgg/t3code#48036
* fix(contracts): preserve literal edge whitespace in filesystem metadata and browse cwd paths by @saphid in pingdotgg/t3code#47982
* fix(web): Shift+Tab from a newly saved citation returns to its comment button by @only21mil in pingdotgg/t3code#48035
* fix(server): omit hidden labels from standalone EPUB maps by @KiritoXDone in pingdotgg/t3code#48025
* fix(shared): keep attached context when a code fence is still open by @saphid in pingdotgg/t3code#48011
* fix(client-runtime): select Me in the PR author menu for typed author:@me by @saphid in pingdotgg/t3code#47945
* fix(shared): quoted search no longer matches the start of a longer Hindi word by @StiensWout in pingdotgg/t3code#48033
* fix(web): Restore device defaults also resets font smoothing by @Pruthvirajcodes in pingdotgg/t3code#47970
* fix(shared): quoted search finds an acronym before a decomposed accented word by @StiensWout in pingdotgg/t3code#48031
* fix(desktop): preserve browser state while preview initializes by @shivamhwp in pingdotgg/t3code#48014
* fix(web): scrolling an expanded diff no longer rewrites unchanged lines by @juliusmarminge in pingdotgg/t3code#48057
* fix(ui): align picker icons with their titles by @Yash-Singh1 in pingdotgg/t3code#48079
* fix(server): sync hook edits after partial commits by @UtkarshUsername in pingdotgg/t3code#47412
* fix(acp): check the model after applying the option that selects its catalog by @juliusmarminge in pingdotgg/t3code#48076
* fix(web): settling skips a next thread deleted while it was saving by @StiensWout in pingdotgg/t3code#48041
* fix(client-runtime): do not start shell comments inside parameter expansions in command labels by @saphid in pingdotgg/t3code#48048
* fix(web): hide the empty Turn submenu in the Diff scope menu before any turn completes by @only21mil in pingdotgg/t3code#48056
* fix(shared): quoted word search skips longer words after a decomposed accent by @StiensWout in pingdotgg/t3code#48034
* fix(shared): quoted thread search finds titles with a separate accent inside a word by @StiensWout in pingdotgg/t3code#48032
* fix(web): closing Settings on a directly opened thread no longer adds a Back stop by @StiensWout in pingdotgg/t3code#48040
* fix(server): Claude turns that keep retrying are no longer failed after 10 minutes by @KevinKreps in pingdotgg/t3code#48013

## New Contributors
* @Kamo2323 made their first contribution in pingdotgg/t3code#47910
* @Pruthvirajcodes made their first contribution in pingdotgg/t3code#47966

**Full Changelog**: pingdotgg/t3code@v0.1.14-nightly.20261203.5637...v0.1.14-nightly.20261203.5651

</details>


Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.14-nightly.20261203.5651
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EPUB attachments include hidden labels from standalone SVG chapters

2 participants