Repository navigation
feat(backend): illustrated install steps + launch-day Product Hunt badge on the download page - #12670
Conversation
…t badge on the download page The download landing page ended in a grey text block titled "Installation steps:" with a 1./2./3. list. Replaced it with three illustrated cards below the demo video, built from the real Omi and Applications icons rather than clip art: open omi.dmg from Downloads, drag Omi into Applications, open Omi from Applications. Windows gets the same three-card shape with the SmartScreen step it actually needs. Also adds the Product Hunt badge above the fold for the Omi Desktop launch. It gates itself on a launch-window constant and renders nothing once the window closes, so nobody has to remember to take it down. Product Hunt bakes the vote count into the SVG, so the badge URL's cache-buster is bucketed by the hour instead of the embed snippet's fixed timestamp, which would have frozen the count at whatever a visitor loaded first. Verification: hit GET /v2/desktop/download/latest through the ASGI app with the release fetch stubbed, then rendered the exact response body in headless Chrome at 1100px and 500px. Badge, three cards and the responsive stack all render; an overflow probe reports scrollWidth == clientWidth with no element past the viewport edge. backend/tests/unit/test_desktop_updates.py: 135 passed. Note: the badge currently shows "???" for the count because Product Hunt has not made post 1240025 live yet — other post ids return real numbers through the same widget, and it fills in on its own at launch.
…/updates.py The landing page grew past the product file line-count ratchet on updates.py. The appcast/update-routing logic and the marketing-facing download page change for unrelated reasons, so they get separate modules rather than a line-count exception. Names become public at the module boundary and every in-tree caller moves in this commit; no aliases stay behind in updates.py. backend/routers/updates.py: 1539 -> 1290 lines.
…er extraction updates.py no longer references datetime or timezone; the badge window lives in desktop_download_page.py now.
There was a problem hiding this comment.
4 issues found across 3 files
Confidence score: 3/5
backend/desktop_download_page.pyrenders macOSomi.dmginstructions whenplatform=linux, which can prevent Linux users from installing the app; add AppImage/deb guidance or reject Linux before rendering this page.backend/tests/unit/test_desktop_updates.py'stest_landing_page_drops_the_badge_after_the_windowuses the real current time and an assertion that cannot fail, so badge-retirement regressions could go undetected; control time and assert the rendered state directly.backend/desktop_download_page.pylacks actionable lifecycle metadata for the one-time badge, and its cleanup note points to a nonexistent function; add aLIFECYCLE: one-timemarker, a validDELETE-AFTERreference, and the correct function reference.backend/desktop_download_page.pyuses a purple/blurple Discord link accent that violates the repository's UI rule; switch it to a neutral link color.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="backend/tests/unit/test_desktop_updates.py">
<violation number="1" location="backend/tests/unit/test_desktop_updates.py:2007">
P3: test_landing_page_drops_the_badge_after_the_window does not test the drop: download_landing_html uses the real current time and the assertion `html.count('class="ph-badge"') <= 1` can never fail, since the template inserts the badge at most once. Make it deterministic by patching desktop_download_page.product_hunt_badge_html to return "" (or passing a now after PRODUCT_HUNT_BADGE_ENDS_AT) and assert the badge is absent, and drop the time-dependent 'Renders today' comment.</violation>
</file>
<file name="backend/desktop_download_page.py">
<violation number="1" location="backend/desktop_download_page.py:43">
P2: When `platform=linux` reaches this renderer, the page tells users to open `omi.dmg` and drag it into Applications. Handle Linux with its AppImage/deb instructions or reject Linux before generating this macOS page.</violation>
<violation number="2" location="backend/desktop_download_page.py:92">
P3: This one-time badge cannot be retired from an actionable lifecycle marker, and its cleanup note names a nonexistent function. Add `LIFECYCLE: one-time`, a real `DELETE-AFTER` tracking reference, and the correct function name.</violation>
<violation number="3" location="backend/desktop_download_page.py:224">
P3: The Discord link uses a purple/blurple accent, violating the repository's no-purple UI rule. Use a neutral link color instead.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| 'Launch <b>Omi</b> and finish<br>the setup wizard', | ||
| ), | ||
| ] | ||
| else: |
There was a problem hiding this comment.
P2: When platform=linux reaches this renderer, the page tells users to open omi.dmg and drag it into Applications. Handle Linux with its AppImage/deb instructions or reject Linux before generating this macOS page.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At backend/desktop_download_page.py, line 43:
<comment>When `platform=linux` reaches this renderer, the page tells users to open `omi.dmg` and drag it into Applications. Handle Linux with its AppImage/deb instructions or reject Linux before generating this macOS page.</comment>
<file context>
@@ -0,0 +1,260 @@
+ 'Launch <b>Omi</b> and finish<br>the setup wizard',
+ ),
+ ]
+ else:
+ panels = [
+ (
</file context>
|
|
||
| # Renders today; the gate is exercised directly above. Guard the markup contract | ||
| # so a future edit cannot leave a dangling empty anchor behind. | ||
| assert html.count('class="ph-badge"') <= 1 |
There was a problem hiding this comment.
P3: test_landing_page_drops_the_badge_after_the_window does not test the drop: download_landing_html uses the real current time and the assertion html.count('class="ph-badge"') <= 1 can never fail, since the template inserts the badge at most once. Make it deterministic by patching desktop_download_page.product_hunt_badge_html to return "" (or passing a now after PRODUCT_HUNT_BADGE_ENDS_AT) and assert the badge is absent, and drop the time-dependent 'Renders today' comment.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At backend/tests/unit/test_desktop_updates.py, line 2007:
<comment>test_landing_page_drops_the_badge_after_the_window does not test the drop: download_landing_html uses the real current time and the assertion `html.count('class="ph-badge"') <= 1` can never fail, since the template inserts the badge at most once. Make it deterministic by patching desktop_download_page.product_hunt_badge_html to return "" (or passing a now after PRODUCT_HUNT_BADGE_ENDS_AT) and assert the badge is absent, and drop the time-dependent 'Renders today' comment.</comment>
<file context>
@@ -1944,3 +1951,57 @@ async def test_download_beta_endpoint_does_not_fall_back_to_stable_dmg(self):
+
+ # Renders today; the gate is exercised directly above. Guard the markup contract
+ # so a future edit cannot leave a dangling empty anchor behind.
+ assert html.count('class="ph-badge"') <= 1
</file context>
| .ph-badge:hover {{ opacity: 1; }} | ||
| .ph-badge img {{ width: 250px; height: 54px; }} | ||
| .discord {{ margin-top: 24px; font-size: 14px; color: #888; }} | ||
| .discord a {{ color: #5865F2; text-decoration: none; }} |
There was a problem hiding this comment.
P3: The Discord link uses a purple/blurple accent, violating the repository's no-purple UI rule. Use a neutral link color instead.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At backend/desktop_download_page.py, line 224:
<comment>The Discord link uses a purple/blurple accent, violating the repository's no-purple UI rule. Use a neutral link color instead.</comment>
<file context>
@@ -0,0 +1,260 @@
+ .ph-badge:hover {{ opacity: 1; }}
+ .ph-badge img {{ width: 250px; height: 54px; }}
+ .discord {{ margin-top: 24px; font-size: 14px; color: #888; }}
+ .discord a {{ color: #5865F2; text-decoration: none; }}
+ .discord a:hover {{ text-decoration: underline; }}
+ </style>
</file context>
| # Product Hunt launch badge for "Omi Desktop" — shown on the download landing page | ||
| # only during the launch day, then it disappears on its own. Product Hunt days run | ||
| # midnight-to-midnight Pacific, so the window closes at 2026-09-04 07:00 UTC (Sep 3 PDT). | ||
| # One-time launch scaffolding: delete this constant, _product_hunt_badge_html, and its |
There was a problem hiding this comment.
P3: This one-time badge cannot be retired from an actionable lifecycle marker, and its cleanup note names a nonexistent function. Add LIFECYCLE: one-time, a real DELETE-AFTER tracking reference, and the correct function name.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At backend/desktop_download_page.py, line 92:
<comment>This one-time badge cannot be retired from an actionable lifecycle marker, and its cleanup note names a nonexistent function. Add `LIFECYCLE: one-time`, a real `DELETE-AFTER` tracking reference, and the correct function name.</comment>
<file context>
@@ -0,0 +1,260 @@
+# Product Hunt launch badge for "Omi Desktop" — shown on the download landing page
+# only during the launch day, then it disappears on its own. Product Hunt days run
+# midnight-to-midnight Pacific, so the window closes at 2026-09-04 07:00 UTC (Sep 3 PDT).
+# One-time launch scaffolding: delete this constant, _product_hunt_badge_html, and its
+# tests once the launch window has passed.
+PRODUCT_HUNT_BADGE_ENDS_AT = datetime(2026, 9, 4, 7, 0, 0, tzinfo=timezone.utc)
</file context>
What
Two changes to the desktop download landing page (
/v2/desktop/download/latest).1. Install steps are illustrated cards now, not a text block. The page ended in a grey box titled "Installation steps:" holding a
1./2./3.list joined by<br>. It now renders three cards below the demo video, drawn with the real Omi app icon and the macOS Applications folder icon: openomi.dmgfrom Downloads, drag Omi into Applications, open Omi from Applications. Windows keeps the same three-card shape with the SmartScreen step it actually needs.2. Product Hunt badge for the launch, above the fold. It is gated on a launch-window constant and renders nothing once the window closes, so it takes itself down instead of needing a follow-up PR.
Two details worth calling out:
t=1788421572228. Product Hunt bakes the vote count into the SVG itself, so a fixed value pins every visitor to whatever count was rendered when they first loaded the page.???because Product Hunt has not made post1240025live yet. Other post ids return real numbers through the same widget, so this is the post's state and not a broken embed; it fills in on its own at launch.The second commit moves the landing-page HTML into
backend/desktop_download_page.py.routers/updates.pycrossed the product file line-count ratchet, and the appcast routing and the marketing page change for unrelated reasons, so they get separate modules rather than a line-count exception. Every in-tree caller moved in the same commit and no aliases stay behind.routers/updates.py: 1539 → 1290 lines.Product invariants
backend/routers/updates.py. Behavior unchanged: this PR only touches the HTML the download landing page returns. Beta app identity, the packaged beta artifacts, and the identity-aware appcast feed are untouched, and the 135 tests intest_desktop_updates.py(which cover the identity-aware feed) still pass.Verification
Exercised the real endpoint rather than the template: called
GET /v2/desktop/download/latest?platform=macos&channel=stablethrough the ASGI app with the GitHub release fetch stubbed, then rendered the exact response body in headless Chrome. Re-ran this after the module split, not just before it."Installation steps:" not in response)scrollWidth == clientWidthwith zero elements past the viewport edgebackend/tests/unit/test_desktop_updates.py: 135 passedmake preflight: all manifest checks passNew tests cover what can silently rot: the three macOS steps, the Windows SmartScreen step, steps rendering after the video, badge present inside the window, badge empty at and after the window boundary, and the cache-buster advancing with the hour.