Bug
The PermissionModeSelect component in project settings renders two entries that both mean "use the default permission mode":
- "Project default" — the
__default__ sentinel (mapped to empty string "")
- "Default" — the literal string
"default" from PERMISSION_MODE_OPTIONS
These appear as two distinct dropdown choices but may resolve to the same behavior on the daemon side. Users have no way to know which to pick.
Analyzed against: 96d1649 (current main)
Confidence: High — read the component source directly.
Root Cause
frontend/src/renderer/components/ProjectSettingsForm.tsx:
Lines 18-23 — PERMISSION_MODE_OPTIONS includes { value: "default", label: "Default" }:
const PERMISSION_MODE_OPTIONS = [
{ value: "default", label: "Default" }, // ← literal "default"
{ value: "accept-edits", label: "Accept edits" },
{ value: "auto", label: "Auto" },
{ value: "bypass-permissions", label: "Bypass permissions" },
] as const;
Lines 217-228 — PermissionModeSelect adds a "Project default" sentinel and then iterates all options:
<SelectItem value="__default__">Project default</SelectItem> // ← sentinel → ""
{PERMISSION_MODE_OPTIONS.map((opt) => (
<SelectItem key={opt.value} value={opt.value}>
{opt.label}
</SelectItem>
))}
The dropdown shows: Project default, Default, Accept edits, Auto, Bypass permissions.
Reproduction
- Open any project's settings page
- Click the permission mode dropdown
- See both "Project default" and "Default" as separate options
- Select "Default" — it sends
"default" to the daemon
- Select "Project default" — it sends
"" to the daemon
- Both likely produce the same runtime behavior
Impact
- UX confusion: two options appear to do the same thing
- If the daemon treats
"default" and "" differently, users might unknowingly select the wrong one
Suggested Fix
Either:
- Remove
"default" from PERMISSION_MODE_OPTIONS (the sentinel already covers "use default")
- Or rename the sentinel from "Project default" to something like "Unset" and keep "Default" as the explicit value
Bug
The
PermissionModeSelectcomponent in project settings renders two entries that both mean "use the default permission mode":__default__sentinel (mapped to empty string"")"default"fromPERMISSION_MODE_OPTIONSThese appear as two distinct dropdown choices but may resolve to the same behavior on the daemon side. Users have no way to know which to pick.
Analyzed against:
96d1649(currentmain)Confidence: High — read the component source directly.
Root Cause
frontend/src/renderer/components/ProjectSettingsForm.tsx:Lines 18-23 —
PERMISSION_MODE_OPTIONSincludes{ value: "default", label: "Default" }:Lines 217-228 —
PermissionModeSelectadds a "Project default" sentinel and then iterates all options:The dropdown shows:
Project default,Default,Accept edits,Auto,Bypass permissions.Reproduction
"default"to the daemon""to the daemonImpact
"default"and""differently, users might unknowingly select the wrong oneSuggested Fix
Either:
"default"fromPERMISSION_MODE_OPTIONS(the sentinel already covers "use default")