Fix desktop sidebar animation and restore Discord link#5774
Conversation
Greptile SummaryThis PR makes two focused changes to the desktop sidebar: it removes the tier unlock celebration animation (including Key observations:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[SidebarView onAppear] --> B[syncMonitoringState]
A --> C[appState.checkAllPermissions]
D[onChange: currentTierLevel] --> E{selectedIndex locked?}
E -- Yes --> F[Redirect to dashboard]
E -- No --> G[No action]
H[Bottom Nav Area] --> I[Refer a Friend\ntier 0 or ≥ 4]
H --> J[Discord\nalways visible\nopens NSWorkspace URL]
H --> K[Settings\nalways visible]
J -->|NSWorkspace.open| L[https://discord.com/invite/8MP3b9ymvx]
Last reviewed commit: "Fix desktop sidebar ..." |
| // MARK: - Tier Unlock Animation | ||
|
|
There was a problem hiding this comment.
Empty MARK section left behind
The // MARK: - Tier Unlock Animation section marker was not removed along with the checkForDeferredUnlockAnimation() function it previously organized. It now sits immediately before the closing } of SidebarView with no content, creating a dangling, empty section.
| // MARK: - Tier Unlock Animation | |
| // MARK: - Tier Unlock Animation | |
| } |
Should be removed entirely:
}
| BottomNavItemView( | ||
| icon: "message.fill", | ||
| label: "Discord", | ||
| isCollapsed: isCollapsed, | ||
| iconWidth: iconWidth, | ||
| onTap: { | ||
| guard let url = URL(string: "https://discord.com/invite/8MP3b9ymvx") else { return } | ||
| NSWorkspace.shared.open(url) | ||
| } | ||
| ) |
There was a problem hiding this comment.
Discord invite links created with /invite can be set to expire or have a maximum-use count. If this link is ever revoked or expires, users clicking the Discord button will land on a dead page with no feedback. Consider using a permanent, non-expiring invite link (configured without an expiry in the Discord server settings) and documenting it in a constants file or config so it can be updated easily in one place rather than being hardcoded here.
…#5774) ## Summary - remove the legacy tier unlock celebration from the desktop sidebar to stop the repeated fly-in animation - restore a direct Discord sidebar link to https://discord.com/invite/8MP3b9ymvx ## Verification - `cd desktop && xcrun swift build -c debug --package-path Desktop` - launched a rebuilt `sidebar.app` test bundle from the patched desktop binary
Summary
Verification
cd desktop && xcrun swift build -c debug --package-path Desktopsidebar.apptest bundle from the patched desktop binary