Skip to content

feat(native): close AP-POLICY and advance AP-A11Y parity - #434

Merged
rynfar merged 3 commits into
nativefrom
nw/f6-policy-a11y
Nov 19, 2026
Merged

rynfar merged 3 commits into
nativefrom
nw/f6-policy-a11y

Conversation

@rynfar

@rynfar rynfar commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Refs #106

Problem

Managed policy helpers (AP-POLICY) and screen reader announcements (AP-A11Y) had missing call sites across apps/native:

  • Runtime mode ceiling (maxRuntimeMode) clamping/denials were missing in the composer and model picker permissions popover, and several settings/setup views were missing ManagedControl, ManagedNotice, firstManagedDenial, allowedDrivers, wholeEnvironment, and lockedSettings enforcement.
  • Screen reader announcements were missing "Pinned 1 thread" on pin actions, "Undid <action> of <count> <noun>" after undo execution, multi-environment secondary fleet background thread announcements, and selection-change updates on background announcements.

Changes

  • AP-POLICY (partial #106 -> done):
    • crates/core/src/managed_policy.rs: added is_runtime_mode_above, runtime_mode_ceiling_message, runtime_mode_denial, clamp_runtime_mode, clamp_typed_runtime_mode, updates_message, nightly_denied_message, updates_denial, providers_allowed_drivers_empty, providers_allowed_drivers_restricted, and setting_lock_reason_for_any, with unit tests.
    • crates/app/src/components/managed.rs: implemented ManagedElement for Select (alongside Button and Switch) and added GPUI click-suppression + attribution render tests.
    • crates/app/src/composer/{mod.rs,model_picker.rs}: wired maxRuntimeMode ceiling enforcement in permissions_section_with_policy (disabled reasons + tooltips), guarded set_runtime_mode, and added the warning banner with "Switch to <mode>" clamp action + GPUI test.
    • crates/app/src/chatgpt_setup.rs & crates/app/src/onboarding/agents.rs: wrapped "Continue with ChatGPT" / "Reconnect account" / "Connect another ChatGPT account" in ManagedControl using managed_instance_locks (config.setupMode), driver_denial, and setting_lock_reason.
    • crates/app/src/settings/{providers.rs,providers/editor.rs}: hid Add provider when allowedDrivers is empty or providers locked, hid Text generators when allowedDrivers is restricted, locked provider enable/reset/delete/advanced controls on lockedSettings, and surfaced ManagedNotice above Environment when whole_environment is locked.
    • crates/app/src/settings/{general.rs,projects.rs,diffs_browser.rs,access.rs,environments.rs,scheduled_tasks.rs}: wired first_managed_denial and setting_lock_reason_for_any across Labs/Projects/Browser/Access/Environments/Scheduled Tasks, plus BrowserCookieImport, RemoteClients, and Connect ManagedNotice / ManagedControl call sites, with GPUI tests.
  • AP-A11Y (stays partial #106 honestly for non-macOS platform delivery & VoiceOver live verification):
    • crates/core/src/announcements.rs & crates/app/src/announcements.rs: added undone_announcement (showThreadUndoNotice.ts) and Background::observe_secondary_fleet (BackgroundThreadAnnouncer.tsx) subscribed on AppEvent::Selection | AppEvent::Shell, with unit tests.
    • crates/app/src/sidebar/{controller.rs,bulk.rs}: wired "Pinned 1 thread" (useThreadActions.ts) on local/scoped/drop pin commands and "Undid <action> of <count> <noun>" on undo_latest / run_owned_undo, with GPUI test.
  • apps/native/parity/LEDGER.md: flipped AP-POLICY -> done (blank Issue); updated AP-A11Y (kept partial #106 solely for non-macOS platform delivery & VoiceOver live verification, matching AP-NOTIFY #12 and ST-GENERAL #188).

Verification

  • CARGO_INCREMENTAL=0 cargo clippy --workspace --all-targets -- -D warnings: pass (0 warnings)
  • CARGO_INCREMENTAL=0 cargo test -p t3-core managed_policy -- --test-threads=1: 4/4 pass
  • CARGO_INCREMENTAL=0 cargo test -p t3-core announcements -- --test-threads=1: 14/14 pass
  • CARGO_INCREMENTAL=0 cargo test -p t3-core --test conformance -- --test-threads=1: 8/8 pass
  • CARGO_INCREMENTAL=0 cargo test -p t3-client -- --test-threads=1: 151/151 pass
  • T3_NATIVE_HOME=$(mktemp -d) CARGO_INCREMENTAL=0 cargo test -p t3-native --features snapshot -- --test-threads=1 managed_control_locks_button_switch_and_select_and_renders_attribution managed_runtime_mode_ceiling_renders_banner_blocks_upgrade_and_clamps_down managed_policy_notices_render_across_browser_connections_and_providers undo_latest_draft_and_undo_notice_emit_screen_reader_announcements general::tests: 5/5 pass
  • T3_NATIVE_HOME=$(mktemp -d) CARGO_INCREMENTAL=0 cargo test -p t3-native --features snapshot -- --test-threads=1 settings::environments composer::stream_error_tests::managed_runtime_mode composer::stream_error_tests::usage_limits composer::stream_error_tests::branch_mismatch: 6/6 pass
  • CARGO_INCREMENTAL=0 cargo build -p t3-native: pass
  • vp fmt --check apps/native/parity/LEDGER.md (via main native checkout with node_modules): pass
  • node --test apps/native/parity/sync.test.ts: 47/47 pass
  • node apps/native/scripts/gen-theme.ts --check: skipped in bare worktree (no apps/web/node_modules; no theme files touched)

Built with Antigravity (Gemini 3.1 Pro).

@rynfar rynfar mentioned this pull request Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant