Skip to content

Fix desktop sidebar animation and restore Discord link#5774

Merged
kodjima33 merged 1 commit intomainfrom
fix/sidebar-discord-and-animation
Mar 18, 2026
Merged

Fix desktop sidebar animation and restore Discord link#5774
kodjima33 merged 1 commit intomainfrom
fix/sidebar-discord-and-animation

Conversation

@kodjima33
Copy link
Copy Markdown
Collaborator

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

@kodjima33 kodjima33 merged commit f5b896e into main Mar 18, 2026
2 checks passed
@kodjima33 kodjima33 deleted the fix/sidebar-discord-and-animation branch March 18, 2026 04:56
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 18, 2026

Greptile Summary

This PR makes two focused changes to the desktop sidebar: it removes the tier unlock celebration animation (including TierUnlockCelebration, ConfettiView, checkForDeferredUnlockAnimation, and the associated lastSeenTierLevel/newlyUnlockedItems state) that was triggering unwanted repeated fly-in animations, and it adds a new Discord bottom-nav item that opens the community invite link in the user's browser.

Key observations:

  • The removal is thorough within SidebarView.swift, but OmiApp.swift (line 282) and TierManager.swift (lines 120, 125, 155) still write to the "lastSeenTierLevel" UserDefaults key. With the @AppStorage("lastSeenTierLevel") property removed from SidebarView, these writes are now dead code and can be cleaned up in a follow-up.
  • The empty // MARK: - Tier Unlock Animation section marker was not removed alongside the function it organized.
  • The Discord button uses a hardcoded invite URL (https://discord.com/invite/8MP3b9ymvx), which could expire; a permanent invite link or a centralized constants reference would be more resilient.

Confidence Score: 4/5

  • This PR is safe to merge — the changes are surgical, the removed animation code had no other callers within the changed file, and the Discord link addition is straightforward.
  • The diff is clean and the intent is well-scoped. The only risks are minor: a dangling MARK comment, a hardcoded invite URL that could expire, and dead lastSeenTierLevel writes in two unchanged files. None of these are runtime blockers.
  • No files require special attention; the OmiApp.swift and TierManager.swift dead writes to "lastSeenTierLevel" are worth cleaning up in a follow-up but do not block merging.

Important Files Changed

Filename Overview
desktop/Desktop/Sources/MainWindow/SidebarView.swift Removes the tier unlock celebration animation (TierUnlockCelebration, ConfettiView, checkForDeferredUnlockAnimation, lastSeenTierLevel state) and adds a Discord bottom nav item. A stale MARK comment and a hardcoded Discord invite link (which could expire) are minor issues.

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]
Loading

Last reviewed commit: "Fix desktop sidebar ..."

Comment on lines 1183 to 1184
// MARK: - Tier Unlock Animation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Suggested change
// MARK: - Tier Unlock Animation
// MARK: - Tier Unlock Animation
}

Should be removed entirely:

}

Comment on lines +316 to +325
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)
}
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Invite link can expire

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.

Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
…#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
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