Repository navigation
feat(ai-chat): page widgets, server content and usage analytics - #283
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5eaa87462f
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b67dbfba6c
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af7d4b9649
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 333d16b915
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c31aadd45
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d5328f42d
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
ChatLayoutprops and a serverpageContentresolver, keeping publication/access checks in the application.overrides.aiChat.onAnalyticsEvent. Track widget/tip interactions, suggestions, submissions, response outcomes and clears without prompts, answers, page descriptions or tool output. Preserve existing embedded/full layouts and global page registration.readPageserver tool uses the existing authorization and streaming loop, validates configured paths, preserves full content, and renders a localized status withaiChatClientPlugin({ pageContent: true }); existing custom tools namedreadPagekeep their detailed renderer by default. Page changes stop old streams and ignore late client-tool output.Type of change
Checklist
pnpm buildpassespnpm typecheckpassespnpm lintpassesdocs/content/docs/) and docs production build passesAdditional checks:
pnpm --filter @btst/stack knippasses; registry regenerated. Actual AI SDK model/tool-loop regressions cover a document over 140,000 characters, invalid/oversized paths, missing pages, and a transforming path schema applied once. Component tests cover context isolation, page reset/stream cancellation, tip lifetime, compact reader states, StrictMode analytics deduplication, private-content exclusion, and callback failure isolation. External model requests are not needed for these deterministic library tests; the real Biomogging consumer passed production build/typecheck/lint/ISR and all 286 application browser cases (including 18 chat cases), with no retries or skips against the packed candidate. Its eight guest/member × compound/blog × desktop/mobile long-page cases assert once-only submission/completion events through the real PostHog SDK and exclude question/answer/email content. All four actual OpenRouter guest/member × compound/blog cases also pass on >100,000-character fixtures, retrieving unique final labels and answering follow-ups, with no browser errors or overflow. The fresh Next.js codegen widget browser test also passes (7.7s), including the rendered article content in both page requests. Local registry E2E passed: all nine ejected plugins install and the fresh consumer builds. All required CI/deployments pass on the final reviewed head; the release gate passes. The final reviewed package also passes the consuming app production build/typecheck and all 18 focused chat cases, including unavailable-page tool errors and content-free analytics. One unchanged Media concurrent-render test failed once in CI; its 10-case file passed locally and the single CI retry passed. No Media code or test assertions were changed.Screenshots
Actual Biomogging consumer using the packed 4.2.0 candidate: