Skip to content

fix(widget): honour documented open() deep-links - #531

Merged
mortondev merged 13 commits into
mainfrom
fix/widget-new-post-open
Sep 10, 2026
Merged

mortondev merged 13 commits into
mainfrom
fix/widget-new-post-open

Conversation

@mortondev

@mortondev mortondev commented Sep 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Restore open({ view: 'new-post', title, body, board }) so the iframe switches to Feedback, expands the composer, prefills title/body, and selects a board only if that slug is already on the visitor-visible list.
  • Honour the rest of the public OpenOptions contract: help query, changelog entryId, postId, articleId, chat, and bare open() / home. Disabled surfaces and unseen boards fail closed.

Test plan

  • open({ view: 'new-post', board }): form expanded, Bug Reports selected (local slug bugs; identify / members-only board not exercised)
  • open({ view: 'new-post' }): form expanded, default/single-board behaviour
  • open({ view: 'new-post', board: 'no-such-board' }): picker stays “Select a board”, no invented board
  • open({ view: 'help', query: 'pricing' }): Help with search prefilled
  • open({ view: 'changelog', entryId }): that entry
  • open({ postId }) / open({ articleId }): detail views for slug, kb_article_…, and article_…; missing TypeID → not found
  • Feedback/Help/Changelog off: panel still opens, no invented navigation
  • Host-page SDK Quackback('open', { view: 'new-post', board: 'bugs' }) (browser bundle + explicit init; Vite 404s /api/widget/sdk.js)

Made with Cursor

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T07:34:44.494627Z 2683dae New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f435eaf804

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/widget/widget-home-animated.tsx
Comment thread apps/web/src/routes/widget/index.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: af35efdca7

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/routes/widget/index.tsx Outdated
Comment thread apps/web/src/routes/widget/index.tsx
Comment thread apps/web/src/routes/widget/index.tsx Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

if (!article) {
return (
<div className="flex items-center justify-center py-10">
<div className="text-sm text-muted-foreground">

P1 Badge Do not retain article content across identity changes

Although the query key now includes sessionVersion, this placeholder predicate checks only the article ref. When the host identifies a different user while a segment- or members-only article is open, the new actor's query therefore renders the previous actor's full article until the authorization-aware request finishes. Only reuse the placeholder when both the article ref and session version match, so content from one identity is never shown to another.

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/widget/widget-home-animated.tsx
Comment thread apps/web/src/components/widget/widget-home-animated.tsx
@mortondev
mortondev added this pull request to stack #534 September 9, 2026 23:23
mortondev and others added 3 commits September 10, 2026 00:24
The SDK already sent view/title/board/body and post/article/changelog targets; the iframe dropped new-post after the composer merge and never applied the other fields.

Co-authored-by: Cursor <cursoragent@cursor.com>
Identify now refetches the visitor-visible board list so open({ board })
can select members-only slugs, and articleId accepts a kb_article TypeID.

Co-authored-by: Cursor <cursoragent@cursor.com>
open({ articleId }) now stores the TypeID or slug and lets help-detail
fetch with Bearer + sessionVersion, accepting article_ and kb_article_.
Popular board feeds pass the widget identity so members-only pills are
not empty after identify.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mortondev
mortondev force-pushed the fix/widget-new-post-open branch from 7d94198 to f167710 Compare September 9, 2026 23:24

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f167710e35

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/routes/widget/index.tsx
Comment thread apps/web/src/components/widget/widget-help-detail.tsx Outdated
Similar-post hits are cached per session so a later identify cannot
keep showing another visitor's private titles. Popular Ideas keeps the
SDK ?board= filter across session re-keys, and article detail no longer
reuses another actor's content as placeholder data.

Co-authored-by: Cursor <cursoragent@cursor.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Changelog entryId fetches with the widget Bearer and sessionVersion so
an authenticated-audience entry is not treated as anonymous. Article
detail passes the active widget locale through the same query key as
help search, so a translated article is not swapped for the default.

Co-authored-by: Cursor <cursoragent@cursor.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…ocale fallback

Keep similar-search hits session-scoped and bounded, send Bearer on the
changelog feed, fall back to the default-locale article, and stop Home
from advertising a board filter or overwriting a visitor board pick.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

placeholderData: keepPreviousData,

P1 Badge Drop search placeholders when the widget identity changes

When an identified visitor's search returns posts from members-only or segment-scoped boards, logout or identifying a different visitor changes sessionVersion, but keepPreviousData carries those results into the new query and the rows remain visible and clickable while the new request is pending. This exposes the previous visitor's private post titles to the next identity; preserve results only for search-term changes within the same session, and clear them on session changes.

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/routes/widget/index.tsx Outdated
Deduplicate session-cache reset and match placeholders by key prefix
instead of queryKey slot indexes.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3d668c5ecb

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/widget/widget-home-animated.tsx
Comment thread apps/web/src/routes/widget/index.tsx
Comment thread apps/web/src/components/widget/widget-help-detail.tsx
Logout no longer keeps the previous visitor's boards or search hits, help
collections refetch with Bearer + sessionVersion, and View on portal
transfers an identified OTT for articles and changelog entries.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b02c8d9483

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/widget/widget-help.tsx
Comment thread apps/web/src/components/widget/widget-help-detail.tsx Outdated
Comment thread apps/web/src/routes/widget/index.tsx
…t board filters

Help search sends the widget Bearer and is session-scoped; article "View on
portal" uses hcArticlePath with the resolved locale; Popular Ideas clears a
filter the current session can no longer see.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 54416d9db8

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/help-center/use-kb-search.ts
Comment thread apps/web/src/components/widget/widget-messenger.tsx
Comment thread apps/web/src/routes/widget/index.tsx
In-flight KB search is aborted when sessionVersion changes, messenger
suggestions re-key with identity, and a compose board the live list no
longer contains falls back to the default.

Co-authored-by: Cursor <cursoragent@cursor.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@mortondev

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cf211e03ef

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/widget/widget-help.tsx
Comment thread apps/web/src/components/widget/widget-help-category.tsx
mortondev and others added 2 commits September 10, 2026 07:56
SDK-only visitors can retrieve the same gated articles they can browse,
and a replacement visitor is not left on a members-only category.

Co-authored-by: Cursor <cursoragent@cursor.com>
The mock was inferred as taking no arguments, so reading the request
init from mock.calls failed CI typecheck.

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a1a768967

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/widget/widget-home-animated.tsx Outdated
Comment thread apps/web/src/components/widget/widget-changelog.tsx
A replacement visitor who picked another board after open() is no longer
overwritten when a restricted slug reappears, and a gated changelog
category clears once the new session feed does not contain it.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mortondev
mortondev merged commit 43df5c9 into main Sep 10, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant