Skip to content

chore: sync with upstream pingdotgg/t3code main - #52

Merged
yordis merged 4 commits into
mainfrom
yordis/chore-sync-upstream-20260917-1
Sep 17, 2026
Merged

yordis merged 4 commits into
mainfrom
yordis/chore-sync-upstream-20260917-1

Conversation

@yordis

@yordis yordis commented Sep 17, 2026

Copy link
Copy Markdown
Member
  • No divergence collided with this batch, so nothing was re-applied by hand and every file the merge touched is byte-identical to upstream except one.

  • Upstream reworked the usage-scanning region that 0016 adapts. The fork keeps its wrapper there: usage reads only locate provider home directories, so an instance value is used as written and a secret reference can never be reported as unresolved from a usage scan.

  • Upstream's collapsed thoughts land in the component 0003 extends. Upstream's shape is taken whole, because the subagent rows the fork adds sit elsewhere in the file and share none of the state upstream moved into the new disclosure.

Summary by CodeRabbit

  • New Features
    • Added support for additional mobile icons across iOS and Android.
    • Reasoning traces in activity timelines can now be expanded or collapsed, with previews shown when collapsed.
  • Bug Fixes
    • Improved handling of menu icons to prevent invalid symbols from being rendered.
    • Usage data now remains available when transcripts are moved, deleted, or storage directories are recreated.
    • Prevented duplicate usage counting when transcript copies are encountered.

maria-rcks and others added 4 commits September 17, 2026 13:34
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
…#12304)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
…pstream-20260917-1

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@cursor

cursor Bot commented Sep 17, 2026

Copy link
Copy Markdown

PR Summary

High Risk
UsageService changes alter aggregation, caching, and deduplication for billing-related totals; incorrect behavior would misreport tokens/costs across cleanup and multi-environment merges.

Overview
Usage scanning now keeps token/cost/session totals after transcripts are deleted, moved, or provider roots are recreated, by folding retained per-file scan-cache entries into aggregation and persisting stable source fingerprints (dir / volumeId) across restarts. Cache pruning drops only age-expired entries (not “missing from this walk”), failed reads fall back to cached records, and Codex events get occurrence-aware dedupe keys so moved rollouts do not double-count while repeated equal events at the same second still count.

Mobile icons centralize AppSymbolName / AppSymbolViewProps on the Android Tabler wrapper (iOS re-exports them), add SF/Material→Tabler mappings, and gate Android menu leading icons with isAppSymbolName.

Web chat timeline makes nested “Thought” traces inside tool groups collapsible (preview when collapsed, state keyed by message id + row anchor for virtualizer recycling).

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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 17, 2026
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: f052a393-c6b5-45b5-b2ae-be4cae4d0466

📥 Commits

Reviewing files that changed from the base of the PR and between 22b725b and 3c84c91.

📒 Files selected for processing (9)
  • apps/mobile/src/components/AppSymbol.ios.tsx
  • apps/mobile/src/components/AppSymbol.tsx
  • apps/mobile/src/components/EnvironmentMachineSymbol.tsx
  • apps/mobile/src/components/MaterialMenuPopup.android.tsx
  • apps/server/src/usage/UsageService.test.ts
  • apps/server/src/usage/UsageService.ts
  • apps/server/src/usage/usageScanCache.test.ts
  • apps/server/src/usage/usageScanCache.ts
  • apps/web/src/components/chat/MessagesTimeline.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The pull request updates mobile symbol mappings and shared types, preserves usage data across transcript cleanup and restart, and adds collapsible reasoning traces with disclosure state and scroll anchors.

Changes

Mobile symbol mappings and typing

Layer / File(s) Summary
Symbol mappings and shared contracts
apps/mobile/src/components/AppSymbol.tsx
Adds SF Symbol and Material-name mappings. Derives AppSymbolName from the mappings and adds AppSymbolViewProps and isAppSymbolName.
Platform consumers and runtime validation
apps/mobile/src/components/AppSymbol.ios.tsx, apps/mobile/src/components/EnvironmentMachineSymbol.tsx, apps/mobile/src/components/MaterialMenuPopup.android.tsx
Uses shared symbol types across iOS and environment symbols. Android menu icons render only for recognized app symbol names.

Usage retention and scan caching

Layer / File(s) Summary
Retention-based scan cache pruning
apps/server/src/usage/usageScanCache.ts, apps/server/src/usage/usageScanCache.test.ts
Prunes cache entries by retention cutoff and keeps entries for disappeared files within that period.
Source identity and cached transcript persistence
apps/server/src/usage/UsageService.ts
Persists canonical directories and volume IDs. Reuses cached records when transcripts or directories are unavailable.
Retained aggregation and deduplication
apps/server/src/usage/UsageService.ts, apps/server/src/usage/UsageService.test.ts
Aggregates retained records, qualifies Codex deduplication keys by occurrence, and tests cleanup, restart, movement, recreation, merging, and time-window behavior.

Reasoning trace disclosure

Layer / File(s) Summary
Reasoning trace expansion and anchoring
apps/web/src/components/chat/MessagesTimeline.tsx
Adds anchor-aware disclosure state, interactive headers, collapsed previews, and conditional Markdown rendering for reasoning traces.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant UsageService
  participant FileSystem
  participant ScanCache
  participant UsageMerge
  UsageService->>FileSystem: resolve directories and scan transcripts
  UsageService->>ScanCache: load retained source records
  UsageService->>ScanCache: persist updated source metadata
  UsageService->>UsageService: aggregate and deduplicate usage
  UsageService->>UsageMerge: merge environment usage
  UsageMerge-->>UsageService: return merged usage
Loading

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 3c84c

The symbol, usage-retention, and reasoning-disclosure changes appear mergeable after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 9 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: syncing the fork with upstream main. It matches the changeset and is concise.
Description check ✅ Passed The description explains the upstream sync, retained fork-specific behavior, and adopted UI changes. It does not use the required section headings, checklist, or provide UI screenshots for the Message…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB +22 B (+0.2%) 15.1 KiB
Codex Thread snapshot wire 7.1 KiB 7.1 KiB −3 B (−0.0%) 7.3 KiB
Codex Live turn WebSocket wire 6.4 KiB 6.4 KiB +25 B (+0.4%) 7.8 KiB
Codex Live turn WebSocket decoded 56.2 KiB 56.2 KiB +44 B (+0.1%) 66.4 KiB
Codex Live turn messages 8 9 +1 (+12.5%) 21
Claude Total thread wire 13.5 KiB 13.5 KiB +3 B (+0.0%) 15.1 KiB
Claude Thread snapshot wire 7.1 KiB 7.1 KiB −1 B (−0.0%) 7.3 KiB
Claude Live turn WebSocket wire 6.4 KiB 6.4 KiB +4 B (+0.1%) 7.8 KiB
Claude Live turn WebSocket decoded 57.0 KiB 57.0 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 9 9 0 (0.0%) 21

Baseline: 22b725b · PR result: 3c84c91 · 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: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

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

@yordis
yordis merged commit e6b1268 into main Sep 17, 2026
19 of 20 checks passed
@yordis
yordis deleted the yordis/chore-sync-upstream-20260917-1 branch September 17, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 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.

3 participants