Skip to content

feat(site/src/pages/AgentsPage): add fork hooks for tool renderers and the composer - #30

Merged
ibetitsmike merged 3 commits into
mainfrom
mike/fork-foundation-4-site-hooks
Nov 9, 2026
Merged

ibetitsmike merged 3 commits into
mainfrom
mike/fork-foundation-4-site-hooks

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Part of #5

Xum opened this PR on behalf of @ibetitsmike.

Adds the two frontend hooks that fork features use, so the two hot upstream Agents page files carry one fork line each and an upstream sync does not merge into fork code. Both hooks are empty for now, so no tool row and no composer control changes.

  • forkToolRenderers (ChatElements/tools/forkToolRenderers.ts) is spread last into toolRenderers in Tool.tsx. Its renderer props type comes from typeof toolRenderers, so Tool.tsx exports nothing new.
  • ForkComposerSlot (components/ForkComposerSlot.tsx) renders first in the composer controls row of AgentChatInput.tsx, before the context usage indicator, so mic and send stay rightmost. It gets chatId and isDisabled and renders null today. AgentCreateForm also uses AgentChatInput, so the slot mounts there too.

Because the spread is last, a fork renderer with an upstream tool name would replace the upstream one. Fork tool names therefore use the reserved fork_ prefix: forkToolRenderers.test.ts checks that every fork key has the prefix, and, with the fork map mocked empty, that no upstream renderer uses it.

Upstream edits: an import plus one line in each of AgentChatInput.tsx and Tool.tsx.

UAT passed on 5f51c8c (base main d4e1dfc): in headless Chromium, the composer DOM and screenshots on the chat page and on /agents, and the tool rows, match main. The head since then only merges main (#27 and #28), which changes no file under site/.

Validation

Run in node:22-bookworm with the repo biome.jsonc mounted:

  • pnpm install --frozen-lockfile; pnpm run lint (Biome, oxlint, tsc -p ., dpdm with no circular dependency, check-compiler.mjs, knip); pnpm exec biome check --error-on-warnings ..
  • pnpm exec vitest run --project=unit src/pages/AgentsPage: 144 files, 2677 passed, 2 skipped, on the first commit; after the review fixes, ChatElements/tools and AgentChatInput.test.tsx again (20 files, 340 passed), including forkToolRenderers.test.ts, toolIconsCoverage.test.ts, toolLabelVisibility.test.ts and AgentChatInput.test.tsx.
  • Negative controls: adding execute to forkToolRenderers, or registering a fork_shadow renderer upstream, fails forkToolRenderers.test.ts.
  • frontend-deep-review and frontend-review self-review: all comment findings fixed, no open blocking or should-fix items.

…d the composer

Fork features need to add chat tool renderers and composer controls without
editing two hot upstream files. Tool.tsx now spreads forkToolRenderers into
toolRenderers, and AgentChatInput.tsx renders ForkComposerSlot in the composer
controls, one hook line plus one import each. Both fork files hold nothing
today, so no tool row and no control changes.

The spread sits last in toolRenderers, so a fork name that matched an upstream
name would replace the upstream renderer. Fork names therefore stay inside the
reserved "fork_" prefix, and forkToolRenderers.test.ts keeps fork names in that
prefix and keeps upstream names out of it. ToolRendererProps is exported so the
fork map carries the same type as the upstream one.
@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum posted this comment on behalf of @ibetitsmike.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T06:04:06.054428Z 133bfc6 Manual request
ℹ️ 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: 8c97cbdb87

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

@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum posted this comment on behalf of @ibetitsmike.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 5f51c8c76d

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

@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

Xum posted this comment on behalf of @ibetitsmike.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 133bfc6d07

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

@ibetitsmike
ibetitsmike merged commit 2d28793 into main Nov 9, 2026
10 checks passed
@ibetitsmike
ibetitsmike deleted the mike/fork-foundation-4-site-hooks branch November 9, 2026 06:16
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) merged this on behalf of @ibetitsmike as 2d28793 (squash, head 133bfc6). Before merging, Xum checked fork-ci on the exact head (including the site job), the clean Codex review on 133bfc6, 0 unresolved threads, the UAT pass on 5f51c8c (the later merge of main changes no site/ files), and that 72525d2 (#28) was deployed healthy first.

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