feat(loops): Add Introducing Loops promo card#3675
Merged
Conversation
|
😎 This pull request was merged. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/ui/src/features/loops/loopsPromoStore.ts:19
**Dismissal Can Be Lost on Exit**
`dismiss()` updates memory, but `electronStorage` delays the persisted write and only starts an unawaited flush on `pagehide`. If the desktop window closes immediately after dismissal, the IPC write may not finish, so the card appears again on the next launch despite being described as permanently dismissed.
Reviews (1): Last reviewed commit: "add introducing loops promo card and dia..." | Re-trigger Greptile |
There was a problem hiding this comment.
Additive, flag-gated UI promo card with no touch on auth/billing/data/CI/deps; the one review concern (dismissal write possibly lost on quick window close) is a minor UX edge case already mitigated by an explicit flush call and marked resolved, and the author has strong familiarity with this exact code.
- Author wrote 100% of the modified lines and has 30 merged PRs in these paths (familiarity STRONG).
- 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 260L, 6F substantive, 266L/7F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1c-medium (266L, 7F, single-area, feat) |
| stamphog 2.0.0b3 | .stamphog/policy.yml @ e2df6c6 · reviewed head 4491450 |
|
Retaining stamphog approval — delta since last review classified as |
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.
Problem
Loops ships behind its flag but nothing in the app announces it, so people who don't already know the feature exists never find it.
Changes
Adds an "Introducing Loops" card to the bottom left of the sidebar, above the workspace switcher: the loop hog on a solid lighter panel, a one-line description and a small "Learn more" button (same outline style as the Loops page). Clicking it opens an announcement dialog with the hog hero, a short explainer, five example jobs (three engineering, two ops, drawn from the real loop templates) and "Not now" / "Try now" actions. "Try now" navigates to the Loops page.
The card retires itself once it has done its job: answering the dialog either way, dismissing via the hover X or simply visiting the Loops page all hide it permanently (persisted through electronStorage, hydration-gated so it never flashes). "Reset onboarding and tours" in Advanced settings brings it back. Loops also moves above MCP servers in the default sidebar nav order. Everything is gated on the same
LOOPS_FLAGas the nav item, with open/dismiss/try-now analytics events.How did you test this?
pnpm typecheckacross the monorepo and Biome on the touched files, both cleanvitest runon the loops and sidebar suites in packages/ui, 68 tests pass (updated the nav-order test for the new default order)/code/loopsand hides the card, "Not now" and the X hide it too, visiting the Loops page auto-hides it, and the persisted flag survives reload; the promo storereset()restores the cardAutomatic notifications