Skip to content

feat(native): add managed controls and accessibility announcements - #109

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

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

Conversation

@rynfar

@rynfar rynfar commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Native settings could expose actions that an organization's policy refuses, and thread activity had no screen reader announcements. This ports the shared managed control, notice and organization attribution, plus the web announcement queue and thread state machines. Refs #106 (M3); both AP-POLICY and AP-A11Y remain partial with the gaps below.

The wrapper disables the underlying button/switch, retains a focusable explanation, and uses the web's copy and 50% disabled appearance. It covers provider enablement (including Antigravity setup), pairing-link creation, webhook schedule selection/save/re-enable, and the server update notice. Organization attribution appears in both Environments and Sharing & access. Add provider offers only policy-allowed featured and more drivers, and rechecks policy when advancing or saving an already-open dialog. Execution guards recheck policy on action; disabling a provider or webhook task remains available.

Pure core logic covers capability/driver denials, setting and instance-field locks, queue replacement/dedupe/cancellation, silent thread baselines, request IDs, stale details, run endings and cancelled queued runs. Open-thread activity uses the web's presented-run selection (excluding held queues) and includes synthetic secret/link input from the shell. AppState drives background and open-thread speech, with successful editor opens, model/provider selection and Undo notices wired to the shared queue. Stream-only shell ticks do not rebuild background observations; unchanged open-thread activity allocates nothing. Focus entry and blur events restart the 250ms settle deadline after each focus change, including A → B → A. Pending speech uses one cancellable settle timer and does not notify/repaint views.

macOS posts NSAccessibilityAnnouncementRequestedNotification using NSAccessibilityPostNotificationWithUserInfo, on NSApplication because GPUI does not expose an AX element to this client. Polite maps to Medium and assertive to High. Reviewed web callers are polite; the snapshot fixture exercises High too. The offscreen run called AppKit and logged the posted text; VoiceOver was not driven.

Validation:

  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace (70 client, 968 core, 7 conformance, 28 app tests)
  • cargo build -p t3-native --features snapshot
  • node scripts/gen-theme.ts --check
  • node --test parity/sync.test.ts (42 tests)
  • From packages/client-runtime: node ../../apps/native/conformance/generate.ts --check
  • vp run check:changed native
  • Offscreen smoke reads at port 14658, using a copied native home. --managed-policy-fixture changes only client memory. Pointer activation and normal keyboard traversal to the locked Create link control, followed by Space/Enter, leave its dialog closed. No server policy or paid-provider turns were used.

Local evidence (kept local per the worker brief):

  • Unmanaged baseline: /private/tmp/native-106-evidence/before-light.png

  • Locked control and notice, light: /private/tmp/native-106-evidence/policy-light.png

  • Locked control and notice, dark: /private/tmp/native-106-evidence/policy-dark.png

  • Keyboard focus and inert activation: /private/tmp/native-106-evidence/policy-keyboard-light.png

  • Pointer activation: /private/tmp/native-106-evidence/policy-locked-click.png

  • AppKit polite transcript: /private/tmp/native-106-evidence/light.log — Needs approval: Replay demo. Model: Replay (dev)

  • AppKit high-priority transcript: /private/tmp/native-106-evidence/dark.log — Assertive announcement delivery fixture

  • Add provider unmanaged baseline: /private/tmp/native-106-evidence/add-provider-unmanaged.png

  • Add provider policy-filtered featured list: /private/tmp/native-106-evidence/add-provider-policy.png

  • Add provider policy-filtered more list: /private/tmp/native-106-evidence/add-provider-policy-more.png

  • Post-rebase keyboard/announcement pass: /private/tmp/native-106-evidence/review-focus.png, /private/tmp/native-106-evidence/review-focus.log

Remaining gaps:

  • ProviderInstanceCard.tsx: native has no binary/launch configuration or environment-variable editors; per-field/whole-environment locks are pure selectors ready for those surfaces.
  • CodexSetupSection.tsx: native has no managed/existing setup-mode selector.
  • AuthorizedClientsSettings.tsx / ConnectionsSettings.tsx: native has no server network-access toggle, Tailscale/WSL controls or server T3 Connect link management. Native cloud account sign-in is a different operation.
  • Generic web SettingRow managed setting paths, project-default runtime choices and composer runtime ceiling controls are not wired in this slice; the existing scheduled-task ceiling remains in use. Multi-target first-denial selection is also absent with native's single live environment.
  • ScheduledTasksSettings.tsx webhook signatures/filters/delivery history remain the existing native task-editor gap.
  • bootError.ts emergency DOM page / clipboard fallback has no native counterpart. Missing provider-jump/model-number shortcuts remain unported; existing model and provider selection actions announce.
  • Non-macOS announcement delivery logs only. VoiceOver speech itself is unverified.

No edits to the other workers' transcript, webview, diff or composer-context files.

Built with GPT-6.1 Sol in Codex

@rynfar
rynfar force-pushed the nw/106-policy-a11y branch from b616d4b to b9eff1b Compare November 3, 2026 06:06
@rynfar
rynfar merged commit fc49d45 into native Nov 3, 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