Conversation
🦋 Changeset detectedLatest commit: 465b3df The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ef53a75f8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| return ( | ||
| <Popover | ||
| key={`${latestBlogPost.url}:${latestBlogPost.date.toISOString()}`} | ||
| defaultOpen={shouldAutoOpenPopover} |
There was a problem hiding this comment.
Control popover open state when unread status arrives late
Popover is used in uncontrolled mode via defaultOpen, so if latestBlogPost resolves before lastViewedDate, shouldAutoOpenPopover flips from false to true after mount but the popover remains closed. In that race, the effect still calls markLatestBlogPostViewed, which clears the unread state even though the user never saw the “What’s New” content. Because both queries execute independently, this can happen in normal runtime and silently drop the intended announcement.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
1 issue found across 15 files
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="src/entrypoints/options/app-sidebar/whats-new-footer.tsx">
<violation number="1" location="src/entrypoints/options/app-sidebar/whats-new-footer.tsx:84">
P1: `defaultOpen` is computed before both queries are ready, so unread posts may never auto-open when `lastViewedDate` resolves after `latestBlogPost`.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c19d81f849
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| extensionVersion: semanticVersionSchema.nullable().optional(), | ||
| }).nullable() | ||
| videoUrl: bilibiliVideoUrlSchema.optional(), | ||
| extensionVersion: semanticVersionSchema.optional(), |
There was a problem hiding this comment.
Allow null extensionVersion in blog response schema
Changing extensionVersion from nullable+optional to only optional makes previously accepted payloads fail validation when the API returns "extensionVersion": null. In that case blogApiResponseSchema.parse throws, getLatestBlogDate falls back to null, and both the popup notification and the new footer lose latest-post data entirely even though the post is otherwise valid. Keep null accepted (or normalize it) to preserve compatibility with existing responses.
Useful? React with 👍 / 👎.
|
Documentation Updates 1 document(s) were updated by changes in this PR: Internationalization and LocalizationView Changes@@ -782,8 +782,31 @@
The recovery boundary is used in both the popup and options pages to provide graceful degradation when the extension encounters unrecoverable errors.
-### Sidebar Group Labels and Survey Navigation
+### Sidebar Group Labels and Navigation
Sidebar group labels are localized under `options.sidebar.settings` and `options.sidebar.product`. The survey navigation item is localized under `options.survey.title` in all locale files.
+
+#### What's New Footer
+The sidebar includes a "What's New" footer component that displays the latest blog post preview in a popover. This feature has moved from the product navigation to a dedicated `WhatsNewFooter` component located in the sidebar footer.
+
+**i18n Key:**
+- **`options.whatsNew.title`**: Label for the "What's New" footer button (displays an RSS icon)
+
+The footer button uses the key `options.whatsNew.title` to label the RSS icon button. When clicked, it opens a popover at the bottom of the sidebar displaying:
+- Blog post title (as a clickable external link to the full post)
+- Blog post description
+- Optional embedded video preview (Bilibili videos when available)
+
+The popover automatically opens when a new blog post is detected (comparing the latest blog post date with the user's last viewed date). Once opened, the post is marked as viewed. The feature tracks unread status using blog storage utilities and does not sync popover state through configuration.
+
+**Example:**
+
+```yaml
+options:
+ whatsNew:
+ title: What's New
+```
+
+This footer component replaced the previous "What's New" entry in the product navigation section, providing a richer preview experience with inline blog content and video embeds.
### Blog System Localization
The website's blog system uses the `blog` namespace in locale files for all blog-related UI strings, including titles, descriptions, navigation, author/date labels, sharing, and minimum extension version requirements. To add or update blog UI strings, add new keys under `blog` in each locale file. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 465b3df793
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| url: z.string(), | ||
| extensionVersion: semanticVersionSchema.nullable().optional(), | ||
| }).nullable() | ||
| videoUrl: bilibiliVideoUrlSchema.optional(), |
There was a problem hiding this comment.
Relax videoUrl validation to avoid dropping blog posts
latestBlogPostSchema requires videoUrl to be a Bilibili URL with a valid BV id, and getLatestBlogDate parses the entire response in one shot. That means any post carrying a non-Bilibili or malformed videoUrl will make parsing fail and return null, which suppresses both popup and sidebar “What’s New” data even when date/title/url are otherwise valid. This should degrade by omitting the embed, not by discarding the whole post.
Useful? React with 👍 / 👎.
| if (!latestBlogPost) { | ||
| return null |
There was a problem hiding this comment.
Keep a fallback What's New entry when blog fetch is empty
The footer now returns null when latestBlogPost is unavailable, which removes the only sidebar entry point to “What’s New” during transient fetch/validation failures. In the previous navigation flow this menu item always rendered with a /blog fallback URL, so users could still open updates even if latest-post metadata could not be loaded. Hiding the entry entirely is a regression in availability.
Useful? React with 👍 / 👎.
Type of Changes
Description
This PR moves the blog update entry point out of the product navigation and into a dedicated sidebar footer popover.
It adds a richer "What's New" surface that:
useEffectThe branch also includes the icon asset refresh from the earlier
style: change iconcommit.Related Issue
Closes #
How Has This Been Tested?
Tested locally with:
pnpm eslint src/entrypoints/options/app-sidebar/index.tsx src/entrypoints/options/app-sidebar/product-nav.tsx src/entrypoints/options/app-sidebar/whats-new-footer.tsx src/utils/blog.ts src/utils/__tests__/blog.test.tsSKIP_FREE_API=true pnpm vitest run src/utils/__tests__/blog.test.tspnpm type-checkcurrently fails on an existing unrelated error atsrc/utils/atoms/provider.ts:54:TS2589: Type instantiation is excessively deep and possibly infinite.Screenshots
Not included.
Checklist
Additional Information
The changeset file is included in the branch as:
.changeset/whats-new-footer-popover.mdSummary by cubic
Moved “What’s New” from the product nav to a sidebar footer popover with inline blog previews and controlled open state for reliable unread tracking. Refreshed the extension icons.
New Features
getLatestBlogDateto return full post metadata (title,description, optionalvideoUrl); addedextractBilibiliVideoIdandbuildBilibiliEmbedUrlwith unit tests.Bug Fixes
setAnchortoselection-popoverdependencies.mergeUnknown+ Zod validation; added tests forupdateLLMProviderConfigandupdateProviderConfig.Written for commit 465b3df. Summary will update on new commits.