fix(web): inline PermissionError in dir browser with platform-aware i18n guidance#49
Merged
waterbang merged 10 commits intoChesterRa:mainfrom Mar 2, 2026
Merged
Conversation
When SSE disconnects and reconnects, the backend stream seeks to EOF, causing events written during the disconnect window to be missed in the UI. Add a hasConnectedOnceRef to distinguish first connect from reconnect, and call loadGroup on reconnect to compensate for missed events.
…idance Backend returns platform info in error details; frontend renders localized Full Disk Access guidance on macOS, generic permission message on other platforms. Covers en/zh/ja locales.
…bal toast PermissionError and other browse failures now display inside the directory browser panel (red border + inline text) rather than the global header toast, which was obscured by the modal overlay.
Contributor
Author
…m message Remove macOS-specific Full Disk Access instructions and platform branching. Use a single universal 'Permission denied: <path>' message across all locales.
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.


Summary
PermissionErrorinline inside the modal instead of a global toastsys.platformin the error details so the frontend can tailor the messageChanges
Backend (
src/cccc/ports/web/routes/base.py):PermissionErrorresponse now includesdetails.platform(sys.platform)Frontend (
web/src/components/AppModals.tsx,CreateGroupModal.tsx):dirBrowseErrorstate replaces the globalshowError()call for permission errorsplatform === "darwin"→ macOS-specific copy; otherwise generic copyi18n (
locales/en/actors.json,locales/zh/actors.json):permissionDenied— generic fallbackpermissionDeniedMacOS— macOS copy with step-by-step FDA guidance (System Settings → Privacy & Security → Full Disk Access → enable terminal app → restart CCCC)Why local dev often can't reproduce
Terminal-launched non-sandboxed processes inherit TCC session context, so macOS doesn't re-check FDA. The error surfaces when CCCC is started as a launchd service, on a fresh machine (empty TCC.db), or on macOS 15 Sequoia where TCC enforcement is stricter for non-sandboxed CLI processes. Verified on Mac mini where the error was originally reported.
Known gap
Linux-specific guidance (AppArmor / SELinux hint) not included — tracked as follow-up.
Test plan