Skip to content

test: remove static presentation snapshots - #9008

Merged
t3-code[bot] merged 2 commits into
mainfrom
test/prune-useless-tests-20260901-053223
Sep 1, 2026
Merged

test: remove static presentation snapshots#9008
t3-code[bot] merged 2 commits into
mainfrom
test/prune-useless-tests-20260901-053223

Conversation

@t3-code

@t3-code t3-code Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

problem

these two test files only maintained snapshots of source literals. they would fail on intentional presentation edits and be updated alongside the implementation without protecting behavior.

removal evidence

  • apps/web/src/components/ui/menu.test.tsx server-rendered MenuRadioItem only to check the literal -mx-0.5 utility already declared directly on that component. it exercised no menu interaction, state, geometry, or layout measurement.
  • apps/mobile/src/lib/typography.test.ts restated arbitrary values from MOBILE_TYPOGRAPHY and MOBILE_CODE_SURFACE. the production derivations remain covered by appearancePreferences.test.ts, including the 16pt default, authored scale variables, and code-surface geometry.

four initially considered web suites were retained after review confirmed they protect selector ownership, semantic contrast, disabled-control tooltips, and address-bar state.

verification

  • before removal: 7 targeted files passed, 23 tests passed
  • after removal: 5 retained and canonical files passed, 20 tests passed
  • targeted lint passed
  • targeted formatting passed on 7 files
  • web typecheck passed
  • mobile typecheck passed
  • git diff --check passed
  • the final diff contains only 43 deleted lines across 2 complete test files

openai gpt-5.6-sol via hermes agent


Note

Low Risk
Test-only deletion with no production code changes; remaining targeted suites still pass per PR verification.

Overview
Deletes apps/mobile/src/lib/typography.test.ts and apps/web/src/components/ui/menu.test.tsx, which only asserted fixed literals (font scale numbers, MOBILE_CODE_SURFACE fields, and the -mx-0.5 class on menu radio items) via static markup or object equality.

Those checks duplicated implementation details and would break on intentional styling tweaks without guarding interaction, layout, or preference resolution. Mobile typography and code-surface behavior stay covered elsewhere (e.g. appearance preference tests); other web UI suites that assert selector ownership, contrast, tooltips, and address-bar behavior are unchanged.

Reviewed by Cursor Bugbot for commit 7bf34d7. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Remove static presentation snapshot tests for typography and menu

Deletes typography.test.ts and menu.test.tsx, which asserted on hardcoded presentation values such as the MOBILE_TYPOGRAPHY scale and the -mx-0.5 class on radio menu items.

Macroscope summarized 7bf34d7.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 1, 2026

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR only deletes tests. Four of the removed web suites are not static presentation snapshots — they pin interaction/state/selector-ownership contracts that this codebase has regressed on before (disabled-control tooltips, the contrast-era --control-icon-color indirection, command inset selector ownership, unfocused address-bar value). Removing them leaves those contracts unguarded with no replacement coverage in the PR. apps/web/src/components/ui/menu.test.tsx is a pure class-string snapshot and is reasonable to prune.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/preview/PreviewChromeRow.test.tsx
Comment thread apps/web/src/components/ui/button.test.tsx
Comment thread apps/web/src/components/ui/command.test.tsx
Comment thread apps/web/src/components/chat/PanelLayoutControls.test.tsx
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.3 KiB 13.3 KiB −12 B (−0.1%) 15.1 KiB
Codex Thread snapshot wire 6.9 KiB 6.9 KiB −4 B (−0.1%) 7.3 KiB
Codex Live turn WebSocket wire 6.4 KiB 6.4 KiB −8 B (−0.1%) 7.8 KiB
Codex Live turn WebSocket decoded 55.6 KiB 55.6 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 10 10 0 (0.0%) 21
Claude Total thread wire 13.3 KiB 13.3 KiB 0 B (0.0%) 15.1 KiB
Claude Thread snapshot wire 6.9 KiB 6.9 KiB +5 B (+0.1%) 7.3 KiB
Claude Live turn WebSocket wire 6.4 KiB 6.4 KiB −5 B (−0.1%) 7.8 KiB
Claude Live turn WebSocket decoded 56.4 KiB 56.4 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 10 10 0 (0.0%) 21

Baseline: ce71c04 · PR result: 7bf34d7 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 109.4 KiB
  • Claude decoded thread snapshot: 110.1 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@macroscopeapp

macroscopeapp Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 7bf34d7

Macroscope's review found this PR approvable — This PR removes two test-only presentation checks and does not modify production code, configuration, product defaults, or customer-request behavior. Its impact is limited to reducing test coverage in the affected areas.

Notes:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

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

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Sep 1, 2026
@t3-code
t3-code Bot merged commit 73776d4 into main Sep 1, 2026
27 checks passed
@t3-code
t3-code Bot deleted the test/prune-useless-tests-20260901-053223 branch September 1, 2026 07:44
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 1, 2026
## What's Changed
* fix(client): use package import for markdown image helpers by @juliusmarminge in pingdotgg/t3code#9010
* test: remove static presentation snapshots by @t3-code[bot] in pingdotgg/t3code#9008
* perf(server): bound snapshot activity payload memory by @t3dotgg in pingdotgg/t3code#9000
* perf(server): cut idle CPU use and stop provider event leaks by @t3dotgg in pingdotgg/t3code#8187


**Full Changelog**: pingdotgg/t3code@v0.0.38-nightly.20260901.1244...v0.0.38-nightly.20260901.1245

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

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants