chore: add registration payload and Mission Control dashboard#10
chore: add registration payload and Mission Control dashboard#10chitcommit wants to merge 5 commits into
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
14/14 pre-flight checks pass. Submit with CHITTY_REGISTER_TOKEN. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Serves an interactive dashboard at the root path with: - Command palette (Ctrl+K) for fuzzy scraper search - Network topology visualization of all scrapers - Split-pane execute panel with JSON syntax highlighting - Live activity feed, category filtering, and gap detection - Keyboard-first UX (Ctrl+Enter execute, Ctrl+Shift+T token) - Zero external dependencies — all CSS/JS inlined in the Worker Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughAdded a server-rendered dashboard UI and client-side app for chittyscrape, a service registration payload, a root route, CORS update, and Vitest coverage for the dashboard rendering and key UI elements. Changes
Sequence DiagramsequenceDiagram
participant Browser
participant Server
participant HealthAPI
participant CapabilitiesAPI
participant ScrapeAPI
Browser->>Server: GET /
Server-->>Browser: HTML (renderDashboard)
Browser->>Browser: DOMContentLoaded
par Init
Browser->>HealthAPI: GET /health
HealthAPI-->>Browser: status
and
Browser->>CapabilitiesAPI: GET /api/v1/capabilities
CapabilitiesAPI-->>Browser: catalog
end
Browser->>Browser: render topology & cards
alt user selects scraper
Browser->>Browser: highlight node, populate execute panel
end
alt user executes scrape
Browser->>ScrapeAPI: POST /api/scrape/:id (with token)
ScrapeAPI-->>Browser: results
Browser->>Browser: format & display output
end
opt command palette actions
Browser->>Browser: set token, refresh health, reload catalog
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
registration-payload.json (1)
42-42: Repository casing inconsistency.The repository field uses
CHITTYOS/chittyscrapewhile the PR URL showschittyos/chittyscrape. Although GitHub handles case-insensitively, consider using consistent lowercase for uniformity with other references.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@registration-payload.json` at line 42, Normalize the repository value in the registration payload by changing the "repository" field's value from "CHITTYOS/chittyscrape" to the lowercase "chittyos/chittyscrape" so it matches the PR URL and other references; update the string in registration-payload.json for the "repository" key to use consistent lowercase casing.src/frontend.ts (3)
855-861: Unused variable and missingdata-idattribute.The
cardvariable declared at line 856 is never used. Additionally, the selector.scraper-card[data-id="..."]won't match any elements becauserenderCards()doesn't setdata-idon cards. The fallback logic at lines 858-859 works correctly, so this is just dead code.Suggested cleanup
node.onclick = () => { - const card = document.querySelector('.scraper-card[data-id="' + s.id + '"]'); - // Find matching card document.querySelectorAll('.scraper-card').forEach(c => { if (c.querySelector('.card-id')?.textContent === s.id) selectScraper(s, c); }); };🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/frontend.ts` around lines 855 - 861, Remove the dead/unused lookup in node.onclick: either eliminate the unused variable "const card = document.querySelector('.scraper-card[data-id=\"' + s.id + '\"]');" from the onclick handler in the node.onclick block, or instead update renderCards() to set a data-id attribute on each card (data-id = s.id) so that the selector works; keep the existing fallback loop that calls selectScraper(s, c) intact.
515-517: Consider adding ARIA labels for keyboard shortcuts.The command trigger button shows "K" but screen readers won't announce it as a keyboard shortcut. Adding
aria-labelwould improve accessibility.Suggested enhancement
- <button class="cmd-trigger" onclick="openCmd()" title="Command Palette"> + <button class="cmd-trigger" onclick="openCmd()" title="Command Palette" aria-label="Search scrapers, press Control plus K"> Search scrapers... <kbd>K</kbd> </button>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/frontend.ts` around lines 515 - 517, The button with class "cmd-trigger" that calls openCmd() lacks accessible metadata for the keyboard shortcut; add an aria-label describing the action and shortcut (e.g., "Open command palette, shortcut K") and include the aria-keyshortcuts attribute set to "K" so screen readers and AT tools announce the shortcut; update the <button class="cmd-trigger" onclick="openCmd()"> element to include these attributes while keeping the visible text unchanged.
1092-1099: JSON highlighting doesn't handle escaped quotes in strings.The regex
/:\s*"([^"]*)"/gat line 1095 won't correctly handle strings containing escaped quotes (e.g.,"value with \" inside"). The highlighting may be incorrect for such payloads.This is a minor visual issue for edge cases in the dashboard display.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/frontend.ts` around lines 1092 - 1099, The syntaxHighlight function's string-matching regex (the pattern used to find values after colon and quote) fails on strings with escaped quotes; update the string-value matcher inside syntaxHighlight so it matches quoted JSON strings that allow escaped characters (i.e., match a quote, then any sequence of either an escaped character or any character except backslash/quote, then the closing quote) and use that capturing group for the replacement; target the existing syntaxHighlight function and replace the current string-value regex with one that supports escaped quotes/backslashes to fix highlighting of values like "value with \" inside".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@registration-payload.json`:
- Around line 5-18: The endpoints array in registration-payload.json is missing
the new dashboard route added as GET / in src/index.ts (the route handler
mounted at "/" around the file's route-setup); update the "endpoints" array to
include "/" (or "/dashboard" if you rename the route) so service registration
reflects the new dashboard route and service discovery includes that root
endpoint.
---
Nitpick comments:
In `@registration-payload.json`:
- Line 42: Normalize the repository value in the registration payload by
changing the "repository" field's value from "CHITTYOS/chittyscrape" to the
lowercase "chittyos/chittyscrape" so it matches the PR URL and other references;
update the string in registration-payload.json for the "repository" key to use
consistent lowercase casing.
In `@src/frontend.ts`:
- Around line 855-861: Remove the dead/unused lookup in node.onclick: either
eliminate the unused variable "const card =
document.querySelector('.scraper-card[data-id=\"' + s.id + '\"]');" from the
onclick handler in the node.onclick block, or instead update renderCards() to
set a data-id attribute on each card (data-id = s.id) so that the selector
works; keep the existing fallback loop that calls selectScraper(s, c) intact.
- Around line 515-517: The button with class "cmd-trigger" that calls openCmd()
lacks accessible metadata for the keyboard shortcut; add an aria-label
describing the action and shortcut (e.g., "Open command palette, shortcut K")
and include the aria-keyshortcuts attribute set to "K" so screen readers and AT
tools announce the shortcut; update the <button class="cmd-trigger"
onclick="openCmd()"> element to include these attributes while keeping the
visible text unchanged.
- Around line 1092-1099: The syntaxHighlight function's string-matching regex
(the pattern used to find values after colon and quote) fails on strings with
escaped quotes; update the string-value matcher inside syntaxHighlight so it
matches quoted JSON strings that allow escaped characters (i.e., match a quote,
then any sequence of either an escaped character or any character except
backslash/quote, then the closing quote) and use that capturing group for the
replacement; target the existing syntaxHighlight function and replace the
current string-value regex with one that supports escaped quotes/backslashes to
fix highlighting of values like "value with \" inside".
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: def7e521-8239-476c-9082-4e5167b5f444
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
registration-payload.jsonsrc/frontend.tssrc/index.tstest/frontend.test.ts
…lities Addresses 1 high and 2 medium severity CVEs in undici <7.24.0, pulled transitively through miniflare via wrangler and vitest-pool-workers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary
registration-payload.json) for ecosystem compliance/dashboardTest plan
npm run typecheckpassesnpm testpasses (includes frontend metadata test)/dashboardrenders🤖 Generated with Claude Code
Summary by CodeRabbit