Repository navigation
feat(native): close PN-TERMINAL and AP-USAGE parity gaps - #432
Merged
Merged
Conversation
Open
rynfar
force-pushed
the
nw/f5-usage-terminal
branch
from
November 19, 2026 16:49
edd588c to
b9b9ae1
Compare
rynfar
added a commit
that referenced
this pull request
Nov 19, 2026
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.
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.
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
force-pushed
the
nw/f5-usage-terminal
branch
from
November 19, 2026 17:10
b9b9ae1 to
c7c7df7
Compare
This was referenced Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes the remaining parity gaps for
PN-TERMINALandAP-USAGEinapps/native, bringing both ledger rows honestly todone.Summary of Changes
PN-TERMINAL— Composer focus tracking & thread-enter focus restoration (crates/app/src/composer/mod.rs,crates/app/src/terminal/drawer.rs):TerminalDrawer::record_composer_focuson composerInputEvent::Focus,question_focus, andComposer::focus(for the active thread ordraft:<project_id>, excluding fixed/embedded composers).ThreadEnterFocusDecision::FocusComposerinTerminalDrawer::sync_selectionto cancel pending terminal focus and callcomposer::focus_for_thread, and return focus to the composer when closing an open terminal drawer (toggle/close_terminal).Composer::refresh's unconditionalself.focuson!TerminalDrawer::is_active(cx)so the composer does not preemptTerminalDrawer::enter_threadfocus decisions.terminal::drawer::focus_tests::composer_and_terminal_focus_restoration_across_thread_switches.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):UsageDatato track all environments fromstate.fleet.environments, fan outserver.getUsageSummary(provisional→plain→awaitRefresh) andrefresh(refreshUsageRates+getUsageSummary) per connected environment in parallel, merge series/breakdowns/limits/coverage diagnostics across selected environments, targetredeem_resetandPriceOverridesDialogsaves to selected environments, and populate the Environment filter dropdown (All environments+ per-env checkboxes & status).RefreshSpinnerview (8 steps @ 125ms, repainting only the indicator while refreshing and dropping its timer when idle).chrono_tzshort zone abbreviation formatting (EDT/EST, falling back toGMT±Hfor numeric-only zones) for repeated DST fall-back hours incrates/core/src/usage/format.rsand wired it incrates/app/src/usage/overview.rs./usage-limits,/compact+ compact-before-send, prompt-length validation, and inherited fork context usage (contextTransfers/forkedFrom) already match current web.usage::tests::multi_environment_usage_fans_out_merges_filters_and_spins_during_refreshand extendedt3-coreDST formatting tests.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):source_id_from_url,ConfiguredUsageLimitSource,decode_usage_limit_sources,ManagementKeyValue(Literal|Reference), and upsert/remove settings patches incrates/core/src/usage/limits/sources.rswith unit tests.UsageProviderSettings,AddUsageLimitSourceDialog(withSecretSourceDraft,SecretSourceSelect, reference validation,SecretCheckButtonviaserver.checkSecretSource, optional label, and stale-draft clearing on env switch/leave/read-only/async replies), and remove confirmation dialog incrates/app/src/settings/providers/usage_sources.rs, wired intocrates/app/src/settings/providers.rs.settings::providers::usage_sources::tests::add_secret_ref_usage_source_validates_checks_saves_and_drops_stale_drafts.Ledger (
apps/native/parity/LEDGER.md):PN-TERMINAL(partial #249, #224, #235, #390→done) andAP-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 failedcargo test -p t3-client -- --test-threads=1: 150 passed, 0 failedT3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot terminal -- --test-threads=1: 12 passed, 0 failedT3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot usage -- --test-threads=1: 5 passed, 0 failedT3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot providers -- --test-threads=1: 12 passed, 0 failedT3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot composer:: -- --test-threads=1: 23 passed, 0 failedcargo build -p t3-native: passvp fmt --check apps/native/parity/LEDGER.md: passnode apps/native/scripts/gen-theme.ts --check: passnode --test apps/native/parity/sync.test.ts: 47 passed, 0 failedCloses #43
Closes #219
Refs #249, #390
Authored with Antigravity (
f5-usage-terminal).