Add an in-app product-updates subscription. The Resources menu is…#397
Merged
Conversation
…(#2273) * feat(open-knowledge): in-app product-updates subscription (PRD-7196) Regroup the Resources menu into Resources, Community, and Product updates. Add a Subscribe action that opens a reusable email form (shadcn + react-hook-form) posting to the docs /api/subscribe endpoint, plus a live GitHub star count on the GitHub row. Add CORS to the subscribe route so the desktop and web app can call it cross-origin. * refactor(open-knowledge): share getGitHubStars from core Hoist the docs site-nav star fetcher into @inkeep/open-knowledge-core so the Resources menu reuses it instead of duplicating the GitHub API call. An optional RequestInit lets the docs site keep its hourly server-side revalidate while the editor app passes an abort signal. * fix(open-knowledge): address review feedback on subscribe + star fetch - subscribe: add a 15s request timeout so a hung connection can't leave the Submit button spinning forever; log HTTP error responses client-side. - getGitHubStars: compose a caller-supplied signal with the 5s timeout via AbortSignal.any instead of letting it overwrite the timeout. - HelpPopover: reset the nested Subscribe popover when the menu closes. - SubscribeForm: make the live region's role="status" unconditional so the success announcement isn't missed (WCAG 4.1.3). * fix(open-knowledge): a11y + test coverage from subscribe re-review - SubscribeForm: give the Submit button an accessible name while submitting (sr-only "Subscribing..." alongside the aria-hidden spinner). - SubscribeForm: move focus to the confirmation heading after success so keyboard/SR focus isn't orphaned when the form is replaced. - Test the reason: 'invalid' and 'unavailable' submit branches, which have distinct UI from the generic 'error' branch. * feat(open-knowledge): allow dev override of the subscribe endpoint Read VITE_SUBSCRIBE_ENDPOINT (defaulting to the hosted docs endpoint) so the in-app Subscribe form can be pointed at a local docs server to exercise the cross-origin POST + CORS path without hitting production. * revert(open-knowledge): drop VITE_SUBSCRIBE_ENDPOINT override; subscribe form tweaks The env override didn't take effect in the desktop/turbo path and isn't worth the complexity, so the form posts to the hosted endpoint unconditionally again. Also folds in success-view copy tweaks (checkmark + "You're subscribed!") and fixes invalid <div>-in-<p> nesting in the success heading; i18n regenerated. * fix(open-knowledge): use Megaphone for What's new (reserve Sparkles for AI) GitOrigin-RevId: 607980535023debe43e3e9b950feaff199b4a634
Contributor
There was a problem hiding this comment.
Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28470570830). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.
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.
Add an in-app product-updates subscription. The Resources menu is regrouped into Resources, Community, and Product updates, and a new Subscribe action opens a reusable email form (shadcn + react-hook-form) that registers the address through the
/api/subscribeendpoint. The GitHub row now shows the repo's live star count.