Skip to content

Fix banner tap routing and session restore crash#1092

Merged
SoundBlaster merged 1 commit intomainfrom
fix/banner-tap-session-crash
Mar 31, 2026
Merged

Fix banner tap routing and session restore crash#1092
SoundBlaster merged 1 commit intomainfrom
fix/banner-tap-session-crash

Conversation

@SoundBlaster
Copy link
Copy Markdown
Owner

Summary

  • Banner tap did nothing: Tapping "View Integrity Report" now opens the integrity inspector panel and dismisses the banner. Previously the onTap handler only called focusIntegrityDiagnostics() which selected a node internally but never set showInspector = true, so nothing was visible to the user.
  • Startup crash on duplicate session URLs: SessionPersistenceService.applySessionSnapshot used Dictionary(uniqueKeysWithValues:) which fatally crashes when two session file entries share the same canonical URL. Switched to Dictionary(_:uniquingKeysWith:) keeping the entry with the lower orderIndex.

Test plan

  • Open a file with integrity issues — banner appears with "View Integrity Report"
  • Tap "View Integrity Report" — inspector panel opens, banner dismisses
  • Relaunch app with a session snapshot that contains duplicate file URLs — no crash
  • All 382 existing tests pass

🤖 Generated with Claude Code

- Tapping "View Integrity Report" now opens the inspector panel and dismisses the banner, instead of doing nothing
- Fix startup crash when a session snapshot contains duplicate file URLs (Dictionary uniqueKeysWithValues → uniquingKeysWith)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@github-actions
Copy link
Copy Markdown

🔍 SwiftLint Code Quality Report

No violations found! Code quality check passed.

@github-actions
Copy link
Copy Markdown

📊 Coverage Gate Results

SUMMARY
================================================================================

Total Source LOC: 5,578
Total Test LOC:   4,962
Overall Test/Code Ratio: 89.0%

Layer                  Source LOC     Test LOC      Ratio
------------------------------------------------------------
Layer 0                        96          142     147.9%
Layer 1                       779          617      79.2%
Layer 2                     1,048          794      75.8%
Layer 3                     2,175        1,448      66.6%
Layer 4                       834        1,442     172.9%
Utilities                     646          519      80.3%

Threshold: 67%
Coverage: 89.0%
Status: ✅ PASS

@SoundBlaster SoundBlaster merged commit f55eade into main Mar 31, 2026
14 checks passed
@SoundBlaster SoundBlaster deleted the fix/banner-tap-session-crash branch March 31, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant