feat(macos): restore async corpus packaging lane - #394
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
📝 WalkthroughSummaryThis PR restores bounded source changes for asynchronous desktop corpus loading and macOS packaging.
The changes should merge. Reported validation covers shell syntax, ShellCheck, workflow YAML parsing, and whitespace checks. Must FixNone identified. Should Fix
Consider
Approve / Request ChangesApprove with notes, pending completion of workspace Cargo validation. WalkthroughThe viewer renames its corpus-loading error signal. macOS packaging now validates staged bundles, supports rollback, conditionally embeds the application icon, and adds bundle metadata. ChangesViewer updates
macOS packaging
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
✨ Simplify code
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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packaging/macos/install-local.sh`:
- Around line 31-36: Update the installation flow in install-local.sh to stage
APP_SOURCE into a temporary sibling of APP_DEST before removing the installed
app, validate the staged bundle, and only then perform backup rotation and the
final swap. Add cleanup for temporary artifacts and rollback handling so a
failed copy or swap preserves the existing APP_DEST; retain the one-.previous
backup policy.
In `@packaging/macos/package-app.sh`:
- Around line 52-55: Update the Info.plist generation in package-app.sh so
CFBundleIconFile and CFBundleIconName are emitted only after iconutil
successfully creates AppIcon.icns. Ensure the generated plist is linted after
conditional icon metadata is added, before the release packaging step.
- Around line 26-34: Consolidate the icon conversion into a single block in
package-app.sh: remove the later duplicate iconutil invocation, retain one
conversion attempt, and track whether AppIcon.icns was created so the
optional-icon failure policy is applied consistently without aborting packaging
or converting twice.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a91b8e31-aeb4-4444-89e6-b687e2ed5ae2
📒 Files selected for processing (3)
crates/sl-viewer/src/app.rspackaging/macos/install-local.shpackaging/macos/package-app.sh
📜 Review details
⏰ Context from checks skipped due to timeout. (8)
- GitHub Check: semgrep-cloud-platform/scan
- GitHub Check: race smoke + channel/cancel model · windows-latest
- GitHub Check: sl-daemon build · windows-latest
- GitHub Check: jemalloc default-on · windows default build
- GitHub Check: session-ledger build · windows-latest
- GitHub Check: sl-daemon build · macos-latest
- GitHub Check: sl-viewer macOS app · artifact
- GitHub Check: Summary
⚠️ CI failures not shown inline (2)
GitHub Check: Summary: The current Mergify configuration is invalid
Conclusion: failure
* Invalid condition 'author=dependabot[bot] | renovate[bot]' @ root → pull_request_rules → item 1 → conditions → item 0 → author=dependabot[bot] | renovate[bot]
```
Invalid GitHub login
```
* Invalid condition 'author=trunk-io[bot] | mergify[bot] | github-actions[bot]' @ root → pull_request_rules → item 2 → conditions → item 0 → author=trunk-io[bot] | mergify[bot] | github-actions[bot]
```
Invalid GitHub login
```
* Invalid condition 'age>=30d' @ root → pull_request_rules → item 8 → conditions → item 2 → age>=30d
```
Invalid attribute
```
* Extra inputs are not permitted @ root → pull_request_rules → item 0 → actions → post_merge
* Extra inputs are not permitted @ root → pull_request_rules → item 1 → actions → post_merge
* Extra inputs are not permitted @ root → pull_request_rules → item 3 → actions → request_reviews → github_accounts
GitHub Check: Mergify Merge Queue: The current Mergify configuration is invalid
Conclusion: failure
* Invalid condition 'author=dependabot[bot] | renovate[bot]' @ root → pull_request_rules → item 1 → conditions → item 0 → author=dependabot[bot] | renovate[bot]
```
Invalid GitHub login
```
* Invalid condition 'author=trunk-io[bot] | mergify[bot] | github-actions[bot]' @ root → pull_request_rules → item 2 → conditions → item 0 → author=trunk-io[bot] | mergify[bot] | github-actions[bot]
```
Invalid GitHub login
```
* Invalid condition 'age>=30d' @ root → pull_request_rules → item 8 → conditions → item 2 → age>=30d
```
Invalid attribute
```
* Extra inputs are not permitted @ root → pull_request_rules → item 0 → actions → post_merge
* Extra inputs are not permitted @ root → pull_request_rules → item 1 → actions → post_merge
* Extra inputs are not permitted @ root → pull_request_rules → item 3 → actions → request_reviews → github_accounts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{rs,toml}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{rs,toml}: Use the Rust toolchain pinned inrust-toolchain.toml; the workspace MSRV is Rust 1.85.
Validate Rust workspace changes with the prescribed locked build, all-features test suite, Clippy, and rustfmt checks where applicable.
Files:
crates/sl-viewer/src/app.rs
**/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
Fix Clippy warnings; do not add
#[allow]unless it includes a tracking-issue comment.
Files:
crates/sl-viewer/src/app.rs
crates/sl-viewer/**/*.{rs,toml}
📄 CodeRabbit inference engine (AGENTS.md)
crates/sl-viewer/**/*.{rs,toml}: Thesl-viewercrate uses Dioxus 0.6; use the Dioxus CLI/toolchain for desktop development and bundling.
Usecargo check -p sl-vieweras the fast inner-loop check for viewer changes.
Files:
crates/sl-viewer/src/app.rs
crates/sl-viewer/**/*
📄 CodeRabbit inference engine (AGENTS.md)
When packaging the macOS viewer, account for the documented Electrobun/Dioxus code-signing requirements.
Files:
crates/sl-viewer/src/app.rs
🔇 Additional comments (3)
packaging/macos/package-app.sh (1)
64-69: LGTM!crates/sl-viewer/src/app.rs (2)
250-253: LGTM!Also applies to: 874-874, 1166-1166
224-229: 🎯 Functional CorrectnessValidate
sl-vieweron the pinned Rust toolchain.The version contract needs to match the workspace manifest/lockfile for Dioxus 0.6, and these Rust changes need successful validation with:
cargo check -p sl-viewer --lockedcargo build --workspace --all-targets --lockedcargo test --workspace --all-features --lockedcargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo fmt --all -- --check
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packaging/macos/install-local.sh`:
- Around line 46-51: Update the backup rotation in the APP_DEST replacement flow
to stage the new backup in a temporary sibling path instead of removing $backup
first. Run ditto from APP_DEST to the temporary backup, and only after it
succeeds replace $backup atomically or otherwise safely, preserving the existing
recovery bundle if staging fails.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a6d4e953-6345-41a7-b8e4-ef39d779a06f
📒 Files selected for processing (3)
crates/sl-viewer/src/app.rspackaging/macos/install-local.shpackaging/macos/package-app.sh
📜 Review details
⏰ Context from checks skipped due to timeout. (7)
- GitHub Check: Socket Security: Pull Request Alerts
- GitHub Check: Socket Security: Project Report
- GitHub Check: semgrep-cloud-platform/scan
- GitHub Check: sl-viewer macOS app · artifact
- GitHub Check: jemalloc default-on · windows default build
- GitHub Check: Kilo Code Review
- GitHub Check: Summary
⚠️ CI failures not shown inline (2)
GitHub Check: Summary: The current Mergify configuration is invalid
Conclusion: failure
* Invalid condition 'author=dependabot[bot] | renovate[bot]' @ root → pull_request_rules → item 1 → conditions → item 0 → author=dependabot[bot] | renovate[bot]
```
Invalid GitHub login
```
* Invalid condition 'author=trunk-io[bot] | mergify[bot] | github-actions[bot]' @ root → pull_request_rules → item 2 → conditions → item 0 → author=trunk-io[bot] | mergify[bot] | github-actions[bot]
```
Invalid GitHub login
```
* Invalid condition 'age>=30d' @ root → pull_request_rules → item 8 → conditions → item 2 → age>=30d
```
Invalid attribute
```
* Extra inputs are not permitted @ root → pull_request_rules → item 0 → actions → post_merge
* Extra inputs are not permitted @ root → pull_request_rules → item 1 → actions → post_merge
* Extra inputs are not permitted @ root → pull_request_rules → item 3 → actions → request_reviews → github_accounts
GitHub Check: Mergify Merge Queue: The current Mergify configuration is invalid
Conclusion: failure
* Invalid condition 'author=dependabot[bot] | renovate[bot]' @ root → pull_request_rules → item 1 → conditions → item 0 → author=dependabot[bot] | renovate[bot]
```
Invalid GitHub login
```
* Invalid condition 'author=trunk-io[bot] | mergify[bot] | github-actions[bot]' @ root → pull_request_rules → item 2 → conditions → item 0 → author=trunk-io[bot] | mergify[bot] | github-actions[bot]
```
Invalid GitHub login
```
* Invalid condition 'age>=30d' @ root → pull_request_rules → item 8 → conditions → item 2 → age>=30d
```
Invalid attribute
```
* Extra inputs are not permitted @ root → pull_request_rules → item 0 → actions → post_merge
* Extra inputs are not permitted @ root → pull_request_rules → item 1 → actions → post_merge
* Extra inputs are not permitted @ root → pull_request_rules → item 3 → actions → request_reviews → github_accounts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{rs,toml}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{rs,toml}: Use the Rust toolchain pinned inrust-toolchain.toml; the workspace MSRV is Rust 1.85.
Validate Rust workspace changes with the prescribed locked build, all-features test suite, Clippy, and rustfmt checks where applicable.
Files:
crates/sl-viewer/src/app.rs
**/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
Fix Clippy warnings; do not add
#[allow]unless it includes a tracking-issue comment.
Files:
crates/sl-viewer/src/app.rs
crates/sl-viewer/**/*.{rs,toml}
📄 CodeRabbit inference engine (AGENTS.md)
crates/sl-viewer/**/*.{rs,toml}: Thesl-viewercrate uses Dioxus 0.6; use the Dioxus CLI/toolchain for desktop development and bundling.
Usecargo check -p sl-vieweras the fast inner-loop check for viewer changes.
Files:
crates/sl-viewer/src/app.rs
crates/sl-viewer/**/*
📄 CodeRabbit inference engine (AGENTS.md)
When packaging the macOS viewer, account for the documented Electrobun/Dioxus code-signing requirements.
Files:
crates/sl-viewer/src/app.rs
🔇 Additional comments (4)
crates/sl-viewer/src/app.rs (1)
1166-1166: LGTM!packaging/macos/install-local.sh (2)
29-44: LGTM!
54-62: LGTM!packaging/macos/package-app.sh (1)
27-38: LGTM!Also applies to: 77-82
| if [[ -e "$APP_DEST" ]]; then | ||
| backup="${APP_DEST}.previous" | ||
| had_dest=1 | ||
| # Rotate the single previous archive only after the replacement is known to | ||
| # be valid. A failed swap can therefore restore the installed app. | ||
| rm -rf "$backup" | ||
| ditto "$APP_DEST" "$backup" |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Preserve the existing backup until the replacement backup succeeds.
Line 50 deletes ${APP_DEST}.previous before Line 51 copies the installed app. If ditto fails, set -e exits with the installed app intact but without the previous recovery bundle. Stage the new backup in a temporary sibling. Replace ${APP_DEST}.previous only after that copy succeeds.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packaging/macos/install-local.sh` around lines 46 - 51, Update the backup
rotation in the APP_DEST replacement flow to stage the new backup in a temporary
sibling path instead of removing $backup first. Run ditto from APP_DEST to the
temporary backup, and only after it succeeds replace $backup atomically or
otherwise safely, preserving the existing recovery bundle if staging fails.
| @@ -244,10 +247,10 @@ pub fn App() -> Element { | |||
| sessions_signal.set(sessions); | |||
There was a problem hiding this comment.
Suggestion: The history component derives its entries only during its initial render, when the context still contains the empty placeholder vector. The later asynchronous sessions_signal.set(sessions) update does not rebuild that local signal, so the History tab remains empty for the lifetime of the component. Derive the entries reactively from the context or rebuild them in an effect when the shared session signal changes. [stale reference]
Severity Level: Major ⚠️
- ❌ History remains empty after early tab navigation.
- ⚠️ Loaded sessions are invisible in the History sidebar.
- ⚠️ Users must remount the tab to see discovered sessions.(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** crates/sl-viewer/src/app.rs
**Line:** 247:247
**Comment:**
*Stale Reference: The history component derives its entries only during its initial render, when the context still contains the empty placeholder vector. The later asynchronous `sessions_signal.set(sessions)` update does not rebuild that local signal, so the History tab remains empty for the lifetime of the component. Derive the entries reactively from the context or rebuild them in an effect when the shared session signal changes.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix| } | ||
| if active_tab() == Tab::Bundles { | ||
| if let Some(ref err) = *corpus_error_signal.read() { | ||
| if let Some(ref err) = *error_signal.read() { |
There was a problem hiding this comment.
Suggestion: Loader failures are stored in error_signal, but the banner is rendered only while the Bundles tab is active. If the application starts on or switches to History, Replay, or unfinished work after discovery fails, those tabs receive an empty session list without any indication that loading failed. Render the corpus error independently of the active tab or provide an error state for every data-dependent tab. [logic error]
Severity Level: Major ⚠️
- ❌ History and other data tabs hide discovery failures.
- ⚠️ Empty panels appear indistinguishable from empty corpora.
- ⚠️ Users receive diagnostics only after returning to Bundles.(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** crates/sl-viewer/src/app.rs
**Line:** 874:881
**Comment:**
*Logic Error: Loader failures are stored in `error_signal`, but the banner is rendered only while the Bundles tab is active. If the application starts on or switches to History, Replay, or unfinished work after discovery fails, those tabs receive an empty session list without any indication that loading failed. Render the corpus error independently of the active tab or provide an error state for every data-dependent tab.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
User description
Summary
Restore the source-bearing portion of closed #391 as a fresh bounded packet against current
main..previousmacOS app backupProvenance
Rebased from
origin/mainat34b45582; source commits are preserved from #391 (2908ba68and46cbe8d2) ase89415a7andb038577c. The closed PR #391 and Airlock refs remain retained.The prior Trunk v1.0.5 pin is intentionally omitted: its hosted run failed before lint because the action embeds deprecated
actions/upload-artifact@v3. Selection-ID/UI-test follow-ups remain preserved in the prior Airlock refs for separate bounded promotion.Validation
bash -n packaging/macos/install-local.sh packaging/macos/package-app.shshellcheckon both packaging scriptsyqparse of all workflow YAMLgit diff --checkRepository-wide
actionlintstill reports pre-existing workflow issues outside this diff; no workflow files are changed here.CodeAnt-AI Description
Restore responsive desktop corpus loading and safer macOS app updates
What Changed
Impact
✅ Faster desktop startup✅ Safer macOS app updates✅ Branded macOS app icons💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.