Use Grok metadata in terminal context - #58
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe terminal agent metadata now includes branch prefixes. ChangesTerminal marquee
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to 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
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation 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.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
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. |
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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>
|
Preview deployed!
This is a Cloudflare Workers preview version of this PR's build. |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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>
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:
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.
Written for commit d25912f. Summary will update on new commits.