Skip to content

Use Grok metadata in terminal context - #58

Merged
willwashburn merged 2 commits into
mainfrom
codex/fix-grok-terminal-metadata
Sep 1, 2026
Merged

Use Grok metadata in terminal context#58
willwashburn merged 2 commits into
mainfrom
codex/fix-grok-terminal-metadata

Conversation

@willwashburn

@willwashburnwillwashburn commented Sep 1, 2026

Copy link
Copy Markdown
Member

Fixes the homepage Grok terminal context so its branch prefix and mode come from the selected agent metadata instead of hardcoded Codex and auto labels.

Adds a regression test that renders the hero marquee and verifies Grok repository context never uses the Codex prefix.

Verification:

  • npm --workspace web run test (27 passed)
  • npm --workspace web run build (400 pages generated)

Summary by cubic

Fixes the homepage Grok terminal so its branch prefix and mode come from the selected agent metadata instead of hardcoded Codex and auto labels, and prevents marquee gaps on wide viewports.

  • Terminal marquee rows now repeat four times instead of two, so wider screens always stay covered.
  • Adds a regression test that renders the hero marquee, verifies the Grok context never uses the Codex prefix, and checks the repeat count.

Written for commit d25912f. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitaiBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 7a47fb40-63ee-4893-891b-de6968cf73c8

📥 Commits

Reviewing files that changed from the base of the PR and between e72b7dc and d25912f.

📒 Files selected for processing (3)
  • web/app/landing.module.css
  • web/components/home/HeroTerminalMarquee.tsx
  • web/lib/test/hero-terminal-marquee.test.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The terminal agent metadata now includes branch prefixes. GrokTerminalBody uses the selected agent’s prefix and mode. The marquee now renders four repeated sequences and translates by -25%. Tests verify the Grok output and repetition count.

Changes

Terminal marquee

Layer / File(s)Summary
Agent context rendering and validation
web/components/home/HeroTerminalMarquee.tsx, web/lib/test/hero-terminal-marquee.test.tsx
Agent metadata defines branch prefixes for Claude, Codex, Grok, and OpenCode. GrokTerminalBody renders the selected agent’s prefix and mode. Tests validate Grok output and four rendered sequences.
Four-copy marquee loop
web/components/home/HeroTerminalMarquee.tsx, web/app/landing.module.css
The marquee renders four card sequences. The animation translates one sequence width with translateX(-25%). Documentation describes the updated loop.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk:⚪ Minimal · up to d2591

The homepage terminal now uses the selected agent’s metadata and repeats marquee content more reliably. This is a localized presentation change with regression coverage, and no actionable merge-blocking risk remains.

Poem

A rabbit sees four cards in flight
Grok’s branch context now reads right
The track moves one copy wide
Four bright sequences loop inside
Tests watch each hop with care

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 …Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly identifies the main change: using Grok metadata in the terminal context.
Description check✅ PassedThe description accurately covers the Grok metadata fix, regression test, marquee coverage change, and verification results.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-grok-terminal-metadata

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@chatgpt-codex-connector

chatgpt-codex-connectorBot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

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

ReviewStatusCommitReview trigger
📝 Code ReviewCompleted2026-09-01T03:18:20.652767Ze72b7dcPR opened
ℹ️ 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.

@cubic-dev-aicubic-dev-aiBot 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.

1 issue found across 2 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="web/lib/test/hero-terminal-marquee.test.tsx">
<violation number="1" location="web/lib/test/hero-terminal-marquee.test.tsx:15">
P3: This test only guards the branch-prefix half of the fix; the mode-from-metadata half is untested. The Grok context pane renders the mode from AGENT_META (`<span>{meta.mode}</span>`), and the PR's stated fix is that this mode comes from the agent metadata instead of a hardcoded auto label, but the test never asserts it. Add an assertion that the rendered markup contains the metadata-driven mode (e.g. `expect(markup).toContain('auto')` scoped to the Grok context) so a regression in the mode no longer slips through.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

it('uses Grok metadata for the Grok terminal context', () => {
const markup = renderToStaticMarkup(<HeroTerminalMarquee />);

expect(markup).toContain('grok/relay-docs ~/relay/docs');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: This test only guards the branch-prefix half of the fix; the mode-from-metadata half is untested. The Grok context pane renders the mode from AGENT_META (<span>{meta.mode}</span>), and the PR's stated fix is that this mode comes from the agent metadata instead of a hardcoded auto label, but the test never asserts it. Add an assertion that the rendered markup contains the metadata-driven mode (e.g. expect(markup).toContain('auto') scoped to the Grok context) so a regression in the mode no longer slips through.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At web/lib/test/hero-terminal-marquee.test.tsx, line 15:
<comment>This test only guards the branch-prefix half of the fix; the mode-from-metadata half is untested. The Grok context pane renders the mode from AGENT_META (`<span>{meta.mode}</span>`), and the PR's stated fix is that this mode comes from the agent metadata instead of a hardcoded auto label, but the test never asserts it. Add an assertion that the rendered markup contains the metadata-driven mode (e.g. `expect(markup).toContain('auto')` scoped to the Grok context) so a regression in the mode no longer slips through.</comment>
<file context>
@@ -0,0 +1,18 @@
+ it('uses Grok metadata for the Grok terminal context', () => {
+ const markup = renderToStaticMarkup(<HeroTerminalMarquee />);
+
+ expect(markup).toContain('grok/relay-docs ~/relay/docs');
+ expect(markup).not.toContain('codex/relay-docs ~/relay/docs');
+ });
</file context>

@github-actions

github-actionsBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Preview deployed!

EnvironmentURL
Webhttps://4b684dea-agentrelay-web.agent-workforce.workers.dev

This is a Cloudflare Workers preview version of this PR's build.

@cubic-dev-aicubic-dev-aiBot 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.

1 issue found across 3 files (changes from recent commits).

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="web/lib/test/hero-terminal-marquee.test.tsx">
<violation number="1" location="web/lib/test/hero-terminal-marquee.test.tsx:22">
P3: The test name claims it verifies the marquee keeps wide rows covered, but the assertion only counts occurrences of the literal `grok/relay-docs ~/relay/docs` string and hardcodes the expected count to 4. That 4 is just a re-derivation of the `copies = ['a','b','c','d']` loop in `TerminalRow`, so it can pass even while wide viewports expose gaps (e.g. if card widths grow or more copies are needed), and it breaks whenever the copy count is tuned. Assert actual coverage or the copy count derived from the rendered rows instead of a hardcoded magic number.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

it('renders enough repeated sequences to keep wide marquee rows covered', () => {
const markup = renderToStaticMarkup(<HeroTerminalMarquee />);

expect(markup.match(/grok\/relay-docs ~\/relay\/docs/g)).toHaveLength(4);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: The test name claims it verifies the marquee keeps wide rows covered, but the assertion only counts occurrences of the literal grok/relay-docs ~/relay/docs string and hardcodes the expected count to 4. That 4 is just a re-derivation of the copies = ['a','b','c','d'] loop in TerminalRow, so it can pass even while wide viewports expose gaps (e.g. if card widths grow or more copies are needed), and it breaks whenever the copy count is tuned. Assert actual coverage or the copy count derived from the rendered rows instead of a hardcoded magic number.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At web/lib/test/hero-terminal-marquee.test.tsx, line 22:
<comment>The test name claims it verifies the marquee keeps wide rows covered, but the assertion only counts occurrences of the literal `grok/relay-docs ~/relay/docs` string and hardcodes the expected count to 4. That 4 is just a re-derivation of the `copies = ['a','b','c','d']` loop in `TerminalRow`, so it can pass even while wide viewports expose gaps (e.g. if card widths grow or more copies are needed), and it breaks whenever the copy count is tuned. Assert actual coverage or the copy count derived from the rendered rows instead of a hardcoded magic number.</comment>
<file context>
@@ -15,4 +15,10 @@ describe('HeroTerminalMarquee', () => {
+ it('renders enough repeated sequences to keep wide marquee rows covered', () => {
+ const markup = renderToStaticMarkup(<HeroTerminalMarquee />);
+
+ expect(markup.match(/grok\/relay-docs ~\/relay\/docs/g)).toHaveLength(4);
+ });
});
</file context>

@willwashburn
willwashburn merged commit 9923f0b into mainSep 1, 2026
3 checks passed
@willwashburn
willwashburn deleted the codex/fix-grok-terminal-metadata branch September 1, 2026 15:07
Sign up for freeto 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

@willwashburn