fix(android): break IPC settings barrel cycle - #827
Merged
Conversation
Contributor
PR Reviewer Guide 🔍(Review updated until commit a2899ee)Here are some key observations to aid the review process:
|
appergb
commented
Jul 15, 2026
appergb
left a comment
Collaborator
Author
There was a problem hiding this comment.
Senior review — exact head a2899ee
Strengths
- The one-line import change is correctly scoped: the IPC barrel re-exports the same getSettings and setSettings bindings from settings.ts, so the component contract and UI behavior remain unchanged while the barrel edge that caused the cross-chunk cycle is removed.
- Strict RED was demonstrated locally by restoring the old barrel import: the new boundary test exited 1 and identified the old module. A direct tsc plus Vite build with that old import also reproduced both Rollup circular re-export warnings.
- GREEN was re-established at the exact head: the boundary test passed, npm run build completed successfully, and the targeted Rollup warning was absent.
- The prebuild hook is one-shot and non-recursive. The test uses a URL relative to import.meta.url, performs read-only source inspection, and has no generated-artifact or release mutation side effects. Tauri beforeBuildCommand invokes npm run build, so the guard also applies to release builds.
- npm audit reported zero vulnerabilities; git diff --check passed; the source worktree was clean after RED/GREEN restoration.
- All five exact-head check runs completed successfully: Windows, Linux, Android cargo check, macOS, and pr_agent_job.
Critical
None.
Important
None.
Minor
- The regression guard intentionally uses a raw-source regex instead of a TypeScript AST. It decisively catches the reported getSettings/setSettings barrel regression, including the exact old import, but could eventually be made more generic against comment-related false matches or equivalent barrel spellings. This is not blocking because the guarded binding paths are explicit and the subsequent TypeScript/Vite build provides a second verification layer.
- The PR remains draft and branch protection reports review required; those are workflow state, not code defects.
Ready-to-merge verdict
COMMENTED — logical APPROVE. I found no blocking defect at the reviewed exact head. The change satisfies issue #804, preserves the module contract and UI behavior, adds an effective regression boundary, and is supported by local RED/GREEN evidence plus five green exact-head checks. It is ready from a code-review perspective once the maintainer removes draft status and satisfies repository review policy.
Contributor
|
Persistent review updated to latest commit a2899ee |
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.
User description
Summary
Verification
No visual or runtime UI behavior change.
Closes #804
PR Type
Bug fix, Enhancement
Description
Replace barrel import with direct settings module
Add regression guard script for import boundary
Run guard automatically via npm prebuild
Diagram Walkthrough
flowchart LR subgraph Before A["AndroidPermissionsPanel.tsx"] --> B["src/lib/ipc/index.ts (barrel)"] --> C["settings.ts (circular)"] end subgraph After A2["AndroidPermissionsPanel.tsx"] --> C2["src/lib/ipc/settings.ts (direct)"] endFile Walkthrough
AndroidPermissionsPanel.tsx
Fix import to avoid circular dependencyopenless-all/app/android/frontend/components/AndroidPermissionsPanel.tsx
'../../../src/lib/ipc' to '../../../src/lib/ipc/settings'
package.json
Add prebuild script for regression guardopenless-all/app/package.json
scripts/android-ipc-import-boundary.test.mjs"
android-ipc-import-boundary.test.mjs
Add regression guard for import boundaryopenless-all/app/scripts/android-ipc-import-boundary.test.mjs