Skip to content

feat(web): make context window indicator opt-in - #9190

Merged
maria-rcks merged 2 commits into
pingdotgg:mainfrom
maria-rcks:t3code/disable-context-window-indicator
Sep 2, 2026
Merged

feat(web): make context window indicator opt-in#9190
maria-rcks merged 2 commits into
pingdotgg:mainfrom
maria-rcks:t3code/disable-context-window-indicator

Conversation

@maria-rcks

@maria-rcks maria-rcks commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

The circular context window indicator is now a legacy feature that defaults off for existing and new client settings. Users can restore it from Settings → General → Legacy features, and settings search plus restore-default behavior include the new toggle. Verified with contracts and web typechecks, focused settings and meter tests, targeted lint, and a direct schema decode check. Built by gpt-5.6-sol in T3 Code through the Codex harness.


Note

Low Risk
Client-local UI preference with a default-off legacy toggle; no auth, data, or server behavior changes beyond settings persistence.

Overview
The composer’s circular context window usage indicator is hidden by default. A new client setting, contextWindowMeterEnabled (default false), gates whether ChatComposer passes context-window data to the footer primary actions.

Users who want the old behavior can turn it on under Settings → General → Legacy features (“Context window indicator”). Settings search, restore-defaults tracking, and patch/schema decoding in contracts cover the new flag; tests assert default-off and explicit opt-in.

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

Note

Add opt-in contextWindowMeterEnabled setting to ClientSettings

  • Adds the boolean contextWindowMeterEnabled field to ClientSettingsSchema and ClientSettingsPatch, defaulting to false when absent so the context window meter is off by default.
  • Forwards activeContextWindow to ComposerFooterPrimaryActions only when the setting is true; otherwise passes null so the meter is hidden.
  • Exposes a legacy "Context window indicator" switch in General settings under LegacyFeaturesSection, with searchable terms registered in settingsSearch.ts.
  • Updates useSettingsRestore to detect and reset contextWindowMeterEnabled, and adjusts the desktop test fixture to set it explicitly false.
  • Behavioral Change: existing clients with no contextWindowMeterEnabled value now decode as false; verify any out-of-tree consumers of ClientSettings expecting the meter to show by default.

Macroscope summarized 5523463.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 2, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR changes the persisted default behavior of the web composer by hiding the existing context-window indicator unless users opt in through a legacy settings control. The implementation is otherwise contained and additive, but the default change warrants review of the intended product experience.

Notes:

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

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

@maria-rcks
maria-rcks merged commit a19f01f into pingdotgg:main Sep 2, 2026
27 checks passed
@jwilmsnallian

Copy link
Copy Markdown

@maria-rcks Could you share why this is marked as legacy? I found it very useful

sheehanmunim added a commit to munimtechnologies/mtcode that referenced this pull request Sep 2, 2026
…continuation, provider editor redesign, context meter opt-in, linked-PR summaries)

Brings the fork up to origin/main e0da6c6..b57726c. Highlights: continue
active threads across server self-updates (pingdotgg#9167), provider editor and models
list redesign (pingdotgg#8508), opt-in context window meter (pingdotgg#9190), linked-PR summary
RPC with last-good caching (pingdotgg#9176), relay credential refresh before expiry
(pingdotgg#9178), composer draft preserved through worktree setup (pingdotgg#9197), project
skill discovery for Claude (pingdotgg#9210), copy-path on diff headers (pingdotgg#2403), mobile
long-press file references (pingdotgg#9258).

Conflict resolutions (14 files), keep-both unless noted:
- RpcAuthorization / contracts rpc / ws.ts: fork's PR rank, cherry-pick and
  upstream-release RPCs sit beside upstream's new pullRequestsSummary.
- ws.ts route layer: fork's computer task/view brokers plus upstream's
  serverSelfUpdate wrapped in withRunningThreadContinuation.
- PullRequestService: fork's upstream-project reads and scoped diff epochs
  kept; upstream's summary read, refCacheKey and viewer-flight invalidation
  added. invalidate() now scopes diff-only invalidation AND clears viewer
  flights on a whole-workspace refresh. Test file keeps both new suites.
- client-runtime pullRequests: fork's PR stack atoms kept, TTL constant
  takes upstream's new name.
- ChatMarkdown: upstream's one-character gutter rule replaces the fork's
  equivalent digitWidth fix.
- ChatComposer: fork's voice-session button kept; context meter now honours
  settings.contextWindowMeterEnabled.
- ConnectionsSettings: fork's EnvironmentLabelControl kept with upstream's
  min-w-0 truncate.
- mobile ThreadFeed: upstream's markdownLinkHandlers plus the fork's
  onCancelQueuedMessage.
- ClaudeDriver imports: fork's superset. build-desktop-artifact: distro and
  arch both threaded through.

Integration: upstream's restart continuation and the fork's resume-on-restart
both ran at boot on the same orphans. The continuation-marker helpers move to
provider/serverUpdateContinuation.ts and SessionStartupReconciler now defers
any binding carrying the marker to upstream's pass (logged as deferred), so a
thread is never continued twice. Test added.

Dependencies reinstalled for the expo-sharing pin; the stale pnpm copy of
@t3tools/mobile-markdown-text was what broke the mobile typecheck.

Typecheck clean: contracts, shared, client-runtime, server, web, mobile
(desktop exits 1 on a pre-existing warning-level diagnostic). Startup and
self-update suites 36 passing; web sidebar/composer/settings suites 419
passing; fork guard script OK.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@bman654

bman654 commented Sep 3, 2026

Copy link
Copy Markdown

came to ask the same question. I'm worried if there isn't a replacement planned. Managing context is key part of getting good model results.

@maxredundancy

Copy link
Copy Markdown

I'd also be super interested in why this was disabled by default and hidden in legacy?

aorwall added a commit to aorwall/t3code that referenced this pull request Sep 5, 2026
Merges 137 upstream commits (`d937e3075..36c4e9c`) into the fork,
following the `fork-upstream-merge` skill. Landed as a merge commit;
conflicts resolved by the inventory's cached verdicts.

## Merge shape

816 files landed (`git diff --stat HEAD^1 HEAD`) against 811 in the
upstream range; fork delta 650 files. The gap of five is all in landed
and not the range: two fork-owned files touched during resolution
(`sandboxControl.placement.test.tsx` test-prop fixup,
`useSandboxCommandsBanner.tsx` reformat) plus the three fork docs this
merge writes (`inventory.json`, `gaps.md`, `upstream-merge-log.md`). No
upstream work was dropped.

## Conflicts

Resolved by inventory verdict — `AGENTS.md` (kept the fork's slimmed
shape, added Antigravity to the provider list), `contracts/rpc.ts` and
`environment.ts`, the ChatView/MessagesTimeline thread-fork +
message-origin convergence, the preview cluster (`addBrowserSurface`
`profileId` beside the fork's `url`, `rightPanelStore` `openAttachment`
beside `retargetFile`), the settings gates, and the two upstream pingdotgg#9364
test deletions.

Two latent fork bugs surfaced and were fixed: `PreviewView`'s hosted
annotation handler called an unexported helper, now routed through the
exported `capturePreviewAnnotationScreenshot` wrapper (matching the
sibling native handler); and `ChatView` passed a `configuredUrls` prop
the fork's hosted `PreviewPanel` does not accept.

## Unsupported methods

`unsupported-methods.mjs` reported ADD 10; recomputed to 0 by adding
`UnsupportedMethodError` to the shared `ProviderSetupRpcError` union
(nine `provider.auth.*` / `provider.install.*` methods) and to
`server.refreshUsageRates`. `gaps.md` grown with a _Provider setup_
bullet and a `refreshUsageRates` clause on _Usage summary_. The three
DROP entries (`scripts.run`, `subtasks.list`, `threads.getShell`) are
the documented keep-anyway exceptions — `apps/server` still refuses
them.

## Feature classification

**Usable as-is** (UI only, no backend dependency): mod+w tab close
(pingdotgg#9363), PageUp/PageDown chat nav (pingdotgg#9315), diff/PR file tree (pingdotgg#9330),
diff-header copy path (pingdotgg#2403), error-report copy (pingdotgg#9166), opt-in
context-window indicator (pingdotgg#9190), opt-in panel animations (pingdotgg#8830),
proactive panels (pingdotgg#9276), button press feedback (pingdotgg#9349), provider-editor
redesign chrome (pingdotgg#8508).

**Unsupported in Moatless** (resolve to a refusal): Antigravity provider
auth/install and all `provider.*` setup (pingdotgg#9348, pingdotgg#8508),
`server.refreshUsageRates`. Desktop-only and already capability- or
desktop-gated, so no new fork work: preview browser profiles (pingdotgg#7254),
open-links-in-app (pingdotgg#9339), ssh-host suggestions (pingdotgg#9171),
environment-as-machine (pingdotgg#9299), continue-threads-across-restart (pingdotgg#9167,
rides the new `serverUpdateThreadContinuation` capability).

**Backend behavior to reproduce** if Moatless wants it: project icons
(pingdotgg#9137, migration 047), auto-pull clean default branches (pingdotgg#9277,
migration 045), inline citations (pingdotgg#9146, needs the backend to emit
them), the usage page. Migration 046
(RepairAutomaticSettlementTimestamps) is upstream-server-only.

Net-zero: context compaction (pingdotgg#8808) landed and was reverted (pingdotgg#9284).

## Verification

`fmt:check`, `lint`, `typecheck`, `tripwires` and `inventory-check`
green. Full test suite green — one web test failed initially
(`addBrowserSurface.test.ts` did not expect the converged default
`profileId`), fixed and re-run.

Two `verify.mjs` checks exit non-zero and are the caveated machine
failures: `unsupported-methods` on the three documented DROP exceptions
above, and `duplicate-adds` on three confirmed false positives
(`openPreview` in a `ChatView` object literal vs its deps array; three
distinct `it()` blocks in `addBrowserSurface.test.ts`).

Written by Claude Opus 5 in Claude Code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---
Moatless task:
https://moatless.soaplabstest.com/tasks/4e881239-73d1-4a93-9563-6a926e920b42
@ElliotDrel

Copy link
Copy Markdown

Adding another strong vote against classifying this as legacy. I love the context-window indicator and rely on it during long-running work.

Context pressure and compaction materially affect how I manage a thread; hiding that signal makes it harder to decide when to checkpoint, start a new thread, or change course before context quality degrades.

I understand making it optional for people who prefer a cleaner composer, but I would really like this kept as a normal, supported feature—not an opt-in “legacy” feature that signals it may be removed. Ideally it should live in the regular General settings, with a clear long-term commitment or a documented replacement.

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.

5 participants