Repository navigation
Conversation
Limit component permission declarations to enabled instances when admitting and pruning HTTP and program approvals. Cover real component loading, disable/re-enable, shared instances, per-instance hosts, late deliveries, and canceled answers.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Filter declarations by enabled components Sources/OmniWM/Core/Shell/ShellWidgetHost+Permissions.swift, Tests/OmniWMTests/ShellDisabledComponentApprovalTests.swift, Tests/OmniWMTests/ShellNetworkPermissionTests.swift, Tests/OmniWMTests/ShellPermissionPromptTests.swift |
approvalDeclarations() excludes network capabilities from disabled matching components. New tests cover prompt dismissal, late approval callbacks, re-enabling, shared permissions, and extra hosts. Existing host-registry tests configure island components. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: barutsrb
Merge Risk: 
Minimal · previous review d7387
-
The approval behavior appears consistent with enabled component instances. No merge-blocking issue was identified; merge after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Description check
-
Explanation
The description provides the problem, user-facing result, verification evidence, test coverage, and known unrelated failures. It uses different headings from the template, but it contains the required information and is mostly complete.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 4 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
🧪 Generate unit tests (beta)
-
- Create a new PR
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Summary
Disabling the last enabled instance of a component leaves its pending permission prompt open, even after the runtime has disabled the instance. The host still counts declarations retained for the disabled component.
Use the same enabled-instance declarations when admitting and pruning HTTP and native-program approvals. Keep shared prompts while another instance remains enabled, and retire network hosts added only by a disabled instance. Late deliveries and canceled prompt callbacks are covered.
Evidence
enabled=0, pending=1, visible windows=1after disabling. Deleting the instance dismissed the prompt.After: the same native-panel reproduction, linked against the fix, produced
enabled=0, pending=0, visible windows=0in two consecutive runs.swift test: 7,329 tests, 58 skipped, 5 failing cases / 30 assertions in focus transfer, island input, the Lake reference fixture, and window-close focus. Rebuilding the same worktree with the byte-identical upstream permission implementation reproduces the same 5 cases and 30 assertions in a 39-test control run. These failures also occur without this fix.make formatpasses.make verifypasses formatting and lint (18 existing warnings), then stops at the existing GhosttyKit digest mismatch: checkout expectse248aca3…, installed archive isdd856d4d…. Tests build and run with that existing local framework.Merge Danger
Door: two-way
Blast Radius: component permission prompts
Summary by CodeRabbit