Skip to content

feat(chat): complete the headless public surface - #3766

Merged
kojiwakayama merged 3 commits into
mainfrom
feat/inbox-64-headless-chat-surface
Aug 16, 2026
Merged

kojiwakayama merged 3 commits into
mainfrom
feat/inbox-64-headless-chat-surface

Conversation

@kojiwakayama

@kojiwakayama kojiwakayama commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

What

Completes the headless chat public surface in two spots:

  • veryfront/chat entrypoint: re-export getAgentPromptSuggestionItems (and its PromptSuggestion type) alongside the existing getAgentPromptSuggestions, matching what the agent/react barrel already exposes. Headless consumers previously had to reach into internal paths to flatten suggestion groups into renderable items.
  • ConversationsProvider: derive an activeReady boolean on the context value (activeConversationId != null && activeConversation?.id === activeConversationId) so consumers can gate on the full active conversation record having resolved for the current id, instead of re-deriving that comparison in every consumer. The field is optional on ConversationsContextValue so existing caller-supplied structural fixtures stay compatible; the provider always supplies it. The provider value is memoized so the added spread does not introduce a new referential identity per render beyond what useConversations already produces.

Why

Headless integrations that build their own chat UI on top of the public surface need both the flattened prompt-suggestion items helper and a reliable "active conversation is fully loaded" signal without importing from internal module paths.

Tests

  • src/chat/index.test.ts: getAgentPromptSuggestionItems added to the expected runtime exports and asserted identical to the barrel export.
  • src/react/components/chat/chat/contexts/conversations-context.test.tsx: new client-rendered coverage asserting activeReady is false with no active id, false while the full record is still loading or mismatched, and true once the record matching the active id resolves.
  • Full verification run: deno task lint, deno task typecheck, deno task test.

Ref: veryfront-issue-inbox#64

Summary by CodeRabbit

  • New Features

    • Chat components can now reliably indicate when the selected conversation is fully loaded and ready.
    • Added support for prompt suggestion items through the chat interface exports.
  • Bug Fixes

    • Improved conversation readiness handling while loading, when no conversation is selected, or when the displayed conversation does not match the active selection.
  • Tests

    • Added coverage for conversation readiness states and prompt suggestion exports.

@github-actions

github-actions Bot commented Aug 16, 2026 •

Copy link
Copy Markdown

📦 Client bundle boundary

Entrypoint Modules Source size Server leaks
src/index.client.ts 321 1908 KiB ✅ 0

A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in scripts/lint/client-bundle-baseline.json to burn down.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kojiwakayama, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

Limit details: You’ve used all 3 included reviews currently available under your plan.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b25f71b9-7218-4074-a38a-b7a3dff6ad35

📥 Commits

Reviewing files that changed from the base of the PR and between 5441705 and 2cc72b9.

⛔ Files ignored due to path filters (1)
  • src/server/handlers/dev/framework-candidates.generated.ts is excluded by !**/*.generated.*
📒 Files selected for processing (6)
  • docs/api-reference/veryfront/chat.md
  • docs/rfcs/29-chat-api-shape.md
  • docs/rfcs/29-chat-api-shape/README.md
  • docs/rfcs/29-chat-api-shape/helpers.md
  • src/react/components/chat/chat/contexts/conversations-context.test.tsx
  • src/react/components/chat/chat/contexts/conversations-context.tsx

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4c64e34f-dbe8-405f-9099-32748b6f0dc7

📥 Commits

Reviewing files that changed from the base of the PR and between 518bd28 and 5441705.

⛔ Files ignored due to path filters (1)
  • src/server/handlers/dev/framework-candidates.generated.ts is excluded by !**/*.generated.*
📒 Files selected for processing (4)
  • src/chat/index.test.ts
  • src/chat/index.ts
  • src/react/components/chat/chat/contexts/conversations-context.test.tsx
  • src/react/components/chat/chat/contexts/conversations-context.tsx

Included review availability: Your plan includes up to 3 reviews per rolling hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The PR adds agent prompt suggestion exports to the chat barrel. It also adds optional activeReady state to ConversationsContextValue, derives it in ConversationsProvider, and tests readiness across loading and conversation ID changes.

Changes

Chat context and exports

Layer / File(s) Summary
Public chat exports
src/chat/index.ts, src/chat/index.test.ts
The chat barrel exports getAgentPromptSuggestionItems and PromptSuggestion. Tests verify the runtime export and source identity.
Active conversation readiness
src/react/components/chat/chat/contexts/conversations-context.tsx, src/react/components/chat/chat/contexts/conversations-context.test.tsx
ConversationsProvider derives activeReady by matching the selected conversation ID with the loaded record ID. Integration tests cover missing, loading, matching, and mismatched states.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 54417

The PR adds the headless suggestion-items export and an active-conversation readiness signal without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review.

Possibly related PRs

Suggested reviewers: kwakayama, mattboon

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the main change: expanding the headless chat public surface.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/inbox-64-headless-chat-surface

Comment @coderabbitai help to get the list of available commands.

@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: 5441705533

ℹ️ 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 src/chat/index.ts
Comment thread src/react/components/chat/chat/contexts/conversations-context.tsx Outdated
@kojiwakayama
kojiwakayama enabled auto-merge August 16, 2026 16:54
Re-export getAgentPromptSuggestionItems (and its PromptSuggestion type)
from the public veryfront/chat entrypoint, matching the agent/react
barrel, and derive an activeReady boolean on the ConversationsProvider
context value (activeConversationId != null &&
activeConversation?.id === activeConversationId) so consumers can gate
on the full active record without re-deriving it.
@kojiwakayama
kojiwakayama force-pushed the feat/inbox-64-headless-chat-surface branch from 5441705 to 137c6b5 Compare August 16, 2026 22:17
@kojiwakayama

Copy link
Copy Markdown
Contributor Author

Addressed both review findings on exact head 137c6b5c9:

  • regenerated the public chat API reference;
  • made activeReady store-scope-aware so a replaced store cannot expose a stale ready record;
  • added the store replacement regression test.

Verification is green: focused chat tests, typecheck, format, lint, chat ratchets/composability, API reference check, and docs validation.

@codex review

@kojiwakayama

Copy link
Copy Markdown
Contributor Author

Replacement CI exposed three stale RFC export ledgers for the newly public helper. Exact head 2cc72b9af moves getAgentPromptSuggestionItems to the shipped export lists and updates the surrounding copy.

The previously failing deno task lint:rfc-status now passes, as do docs validation (51 tests, 106 steps, 1,383 links) and formatting.

@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: 137c6b5c90

ℹ️ 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 src/chat/index.ts
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 2cc72b9af1

ℹ️ 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".

@kojiwakayama
kojiwakayama added this pull request to the merge queue Aug 16, 2026
Merged via the queue into main with commit 70c37c6 Aug 16, 2026
34 checks passed
@kojiwakayama
kojiwakayama deleted the feat/inbox-64-headless-chat-surface branch August 16, 2026 22:44
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