GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(native): close PN-TERMINAL and AP-USAGE parity gaps by rynfar · Pull Request #432 · rynfar/t3code

Conversation

@rynfar

@rynfar rynfar commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Closes the remaining parity gaps for PN-TERMINAL and AP-USAGE in apps/native, bringing both ledger rows honestly to done.

Summary of Changes

  1. PN-TERMINAL — Composer focus tracking & thread-enter focus restoration (crates/app/src/composer/mod.rs, crates/app/src/terminal/drawer.rs):

    • Wired TerminalDrawer::record_composer_focus on composer InputEvent::Focus, question_focus, and Composer::focus (for the active thread or draft:<project_id>, excluding fixed/embedded composers).
    • Wired ThreadEnterFocusDecision::FocusComposer in TerminalDrawer::sync_selection to cancel pending terminal focus and call composer::focus_for_thread, and return focus to the composer when closing an open terminal drawer (toggle / close_terminal).
    • Gated Composer::refresh's unconditional self.focus on !TerminalDrawer::is_active(cx) so the composer does not preempt TerminalDrawer::enter_thread focus decisions.
    • Added GPUI test terminal::drawer::focus_tests::composer_and_terminal_focus_restoration_across_thread_switches.
  2. AP-USAGE (#43) — Multi-environment Usage aggregation, stepped refresh spinner, and DST fall-back zone abbreviations (crates/app/src/usage/{data,header,mod,overview,dialog,limits,prices}.rs, crates/core/src/usage/{format,tests}.rs):

    • Refactored UsageData to track all environments from state.fleet.environments, fan out server.getUsageSummary (provisional → plain → awaitRefresh) and refresh (refreshUsageRates + getUsageSummary) per connected environment in parallel, merge series/breakdowns/limits/coverage diagnostics across selected environments, target redeem_reset and PriceOverridesDialog saves to selected environments, and populate the Environment filter dropdown (All environments + per-env checkboxes & status).
    • Replaced the static refreshing icon with an isolated stepped GPUI RefreshSpinner view (8 steps @ 125ms, repainting only the indicator while refreshing and dropping its timer when idle).
    • Added chrono_tz short zone abbreviation formatting (EDT/EST, falling back to GMT±H for numeric-only zones) for repeated DST fall-back hours in crates/core/src/usage/format.rs and wired it in crates/app/src/usage/overview.rs.
    • Verified existing composer /usage-limits, /compact + compact-before-send, prompt-length validation, and inherited fork context usage (contextTransfers / forkedFrom) already match current web.
    • Added GPUI test usage::tests::multi_environment_usage_fans_out_merges_filters_and_spins_during_refresh and extended t3-core DST formatting tests.
  3. AP-USAGE (#219, pingdotgg/t3code#27760) — Secret-ref Usage Limit Sources in Settings (crates/core/src/usage/limits/{mod->limits.rs,sources.rs}, crates/app/src/settings/providers/{usage_sources.rs},providers.rs):

    • Ported source_id_from_url, ConfiguredUsageLimitSource, decode_usage_limit_sources, ManagementKeyValue (Literal | Reference), and upsert/remove settings patches in crates/core/src/usage/limits/sources.rs with unit tests.
    • Ported UsageProviderSettings, AddUsageLimitSourceDialog (with SecretSourceDraft, SecretSourceSelect, reference validation, SecretCheckButton via server.checkSecretSource, optional label, and stale-draft clearing on env switch/leave/read-only/async replies), and remove confirmation dialog in crates/app/src/settings/providers/usage_sources.rs, wired into crates/app/src/settings/providers.rs.
    • Added GPUI test settings::providers::usage_sources::tests::add_secret_ref_usage_source_validates_checks_saves_and_drops_stale_drafts.
  4. Ledger (apps/native/parity/LEDGER.md):

    • Updated ONLY PN-TERMINAL (partial #249, #224, #235, #390 → done) and AP-USAGE (partial #43, #219 → done).

Verification Gates

  • cargo clippy --workspace --all-targets -- -D warnings: pass (0 warnings)
  • cargo test -p t3-core -- --test-threads=1: 1739 passed, 0 failed
  • cargo test -p t3-client -- --test-threads=1: 150 passed, 0 failed
  • T3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot terminal -- --test-threads=1: 12 passed, 0 failed
  • T3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot usage -- --test-threads=1: 5 passed, 0 failed
  • T3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot providers -- --test-threads=1: 12 passed, 0 failed
  • T3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot composer:: -- --test-threads=1: 23 passed, 0 failed
  • cargo build -p t3-native: pass
  • vp fmt --check apps/native/parity/LEDGER.md: pass
  • node apps/native/scripts/gen-theme.ts --check: pass
  • node --test apps/native/parity/sync.test.ts: 47 passed, 0 failed

Closes #43
Closes #219
Refs #249, #390

Authored with Antigravity (f5-usage-terminal).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rynfar rynfar mentioned this pull request Nov 19, 2026
Factory status #13
Open
@rynfar
rynfar force-pushed the nw/f5-usage-terminal branch from edd588c to b9b9ae1 Compare November 19, 2026 16:49
rynfar added a commit that referenced this pull request Nov 19, 2026
@rynfar
fix(native): address PR #432 review findings
b9b9ae1
1. Wrap usageLimitSources save/remove payloads in { "patch": ... }.\n2. Gate UsageProviderSettings edits and scoped dispatch on providers:manage (keeping settings:write on checkSecretSource only).\n3. Load/diff UsagePriceOverrides across all selected environments with per-target settings:write and usageModelAliases capability guards, keeping the dialog open with per-env status and Retry failed on partial failure.\n4. Focus surviving active split terminal pane in PanelTerminalView::close_terminal_confirmed.
rynfar added 2 commits November 19, 2026 10:01
@rynfar
feat(native): close PN-TERMINAL and AP-USAGE parity gaps
89f115f
Wire composer focus tracking into TerminalDrawer for thread-enter focus restoration and drawer-close fallback (PN-TERMINAL), add multi-environment Usage page aggregation/filtering/prices fan-out, isolated stepped refresh spinner, and DST fall-back short zone abbreviations (#43), and port UsageProviderSettings / AddUsageLimitSourceDialog with literal and SecretReference management keys, checkSecretSource, and stale-draft clearing (#219, `pingdotgg#27760`). Mark PN-TERMINAL and AP-USAGE done in apps/native/parity/LEDGER.md.
@rynfar
fix(native): address PR #432 review findings
c7c7df7
1. Wrap usageLimitSources save/remove payloads in { "patch": ... }.\n2. Gate UsageProviderSettings edits and scoped dispatch on providers:manage (keeping settings:write on checkSecretSource only).\n3. Load/diff UsagePriceOverrides across all selected environments with per-target settings:write and usageModelAliases capability guards, keeping the dialog open with per-env status and Retry failed on partial failure.\n4. Focus surviving active split terminal pane in PanelTerminalView::close_terminal_confirmed.
@rynfar
rynfar force-pushed the nw/f5-usage-terminal branch from b9b9ae1 to c7c7df7 Compare November 19, 2026 17:10
@rynfar
rynfar merged commit d3c33dd into native Nov 19, 2026
@rynfar
rynfar deleted the nw/f5-usage-terminal branch November 19, 2026 17:23
This was referenced Nov 19, 2026
Native usage page and composer meter: follow-ups #43
Closed
parity: feat(server): read usage limit source keys from a secret provider (pingdotgg/t3code#27760) #219
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@rynfar
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.