improvement(desktop): make file consent clearer and easier to control

Merged
WA
19d ago
+206-33

Summary

  • Add a “Full file access” action to folder consent, followed by an explicit confirmation with Cancel as the default. Cancelling returns to folder consent; expired requests cannot enable access.
  • Keep Desktop settings synchronized with native consent, including reverting the switch when persistence fails. Explain that the previously saved value may return after restart if writing settings fails.
  • Use the existing EMCN dialogs with shorter folder and leave-page copy. The shortcut has no ellipsis, and its confirmation uses “Enable”.

Type of Change

  • Improvement
  • Bug fix

Testing

  • Real Electron E2E: folder consent, full access confirmation/cancellation, settings synchronization, restart/revocation, expired requests, failed persistence, and browser dialog ownership/navigation.
  • Added clean reload, navigation, cleared-draft, and same-document checks; the leave warning stays absent in those cases.
  • Pre-change E2E rejects the missing shortcut. Removing the persistence-failure notification reproduces the stale enabled switch.
  • Browser-dialog stress run: 20 independent Electron launches, 320 checks passed, no retries. The test captures the visible, stable dialog before sending one Escape and verifies draft preservation and typing focus.
  • Full pinned and canary Electron suites: 95 passed on each version, no retries; 12 live-server tests and 3 packaged-binary tests run in their separate CI jobs. Packaged smoke also passed.
  • Complete rebased root bun run test: all 20 tasks passed, including 409 script tests, 36,886 app tests, and 1,070 desktop tests on Linux (2 macOS-specific skips). The macOS desktop suite separately passed all 1,072 tests.
  • Signed, notarized release-workflow candidate validated against staging: deny, cancel, approved read, import and exact-content preview, settings, normal navigation, and clean reload.
  • Root lint, type-check, 58 audits, pinned workflow lint, generated artifact checks, docs manifest, and block registry passed. CI screenshots and JSON reports preserve the native acceptance evidence.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)