From e3227fbd7b3f0f25a1802cca68f4129cf3df9abf Mon Sep 17 00:00:00 2001 From: sarah <129242944+sarah-inkeep@users.noreply.github.com> Date: Wed, 1 Jul 2026 09:14:58 -0700 Subject: [PATCH] feat(open-knowledge): subscribe card for returning users (OK Desktop) (#2324) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(open-knowledge): subscribe card for returning users (OK Desktop) Add a "Stay in the loop" subscribe card to the OK Desktop sidebar footer, shown to returning users who haven't subscribed to product updates yet. - Reuses the existing SubscribeForm (compact arrow submit for the narrow footer) plus a "Follow us on" row linking X, GitHub, and Discord. - Visibility: desktop-only, mutually exclusive with the first-run onboarding card ("not first time" = onboarding not showing), gated on a confirmed returning-user probe, capped at 3 total appearances. - Device-local store mirrors the onboarding-card store; subscribing from this card OR the Resources popover retires it permanently, as does dismissal. Web/CLI render nothing. - Extracts shared social URLs into lib/social-links.ts. * fix(open-knowledge): drop stale knip ignore for @hookform/resolvers The subscribe card makes SubscribeForm (which uses zodResolver from @hookform/resolvers/zod) reachable from a mounted component, so knip now detects @hookform/resolvers as genuinely used — the "uninstantiated" ignoreDependencies entry is stale and knip fails the lint job on it. Remove the entry and add a direct unit test for evaluateReturningUser (mirrors the onboarding hook's evaluateFreshProject test) so the exported fail-safe is covered rather than flagged as an unused export. * fix(open-knowledge): a11y review fixes + valid doc shape in subscribe-card DOM test - SubscribeCard: give the
a named region landmark (aria-label "Stay in the loop") — the heading is a

from SubscribeForm, so aria-labelledby has no target (claude review). - SubscribeForm: drop the redundant aria-label on the compact submit button; the sr-only "Subscribe" span already supplies the accessible name (claude review). - use-subscribe-card-visible.dom.test: the "existing content" case mocked a document with the wrong shape (name/path instead of docName/size/modified), so DocumentListSuccessSchema.safeParse threw and the fail-safe returned false — the test timed out waiting for the card. Use a schema-valid doc. * refactor(open-knowledge): a11y nav grouping + onboarding-suppressed visibility tests Address non-blocking review suggestions on the subscribe card: - Group the "Follow us on" social links in a labeled