Skip to content

chore: add registration payload and Mission Control dashboard#10

Open
chitcommit wants to merge 5 commits into
mainfrom
chore/dep-updates-and-housekeeping
Open

chore: add registration payload and Mission Control dashboard#10
chitcommit wants to merge 5 commits into
mainfrom
chore/dep-updates-and-housekeeping

Conversation

@chitcommit

@chitcommit chitcommit commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add ChittyRegister registration payload (registration-payload.json) for ecosystem compliance
  • Add Mission Control dashboard frontend with real-time service health monitoring, scraper status, and gap detection UI
  • Wire dashboard route into Hono app at /dashboard

Test plan

  • Verify npm run typecheck passes
  • Verify npm test passes (includes frontend metadata test)
  • Deploy to staging and confirm /dashboard renders
  • Validate registration payload against ChittyRegister schema

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Interactive ChittyScrape dashboard at the root: mission control UI with health/version pill, scraper catalog grid, topology view, execute panel, category filtering, command palette, and keyboard shortcuts.
  • Tests
    • Added frontend tests validating dashboard render and key UI elements/shortcuts.
  • Chores
    • Expanded browser CORS origin support and added service registration payload; dependency resolution override applied.

Nick Bianchi and others added 3 commits March 17, 2026 03:34
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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Mar 19, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 23d24af2-07f3-4796-bf74-6b11bc43248b

📥 Commits

Reviewing files that changed from the base of the PR and between 5d51bc2 and 758f706.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • package.json
  • registration-payload.json
✅ Files skipped from review due to trivial changes (2)
  • package.json
  • registration-payload.json

📝 Walkthrough

Walkthrough

Added 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

Cohort / File(s) Summary
Service Registration
registration-payload.json
Added JSON service registration payload for chittyscrape (v0.2.0) with endpoints, entity schemas/relationships, security requirements (apikey + tls), metadata, and canonical service URI.
Frontend (UI + client logic)
src/frontend.ts
New renderDashboard() producing full HTML document with sticky top bar, sidebar filters, topology view, scraper cards, execute panel, command palette, client-side init (fetch /health and /api/v1/capabilities), interactions (select/run scraper, token handling), and keyboard shortcuts.
Server integration & CORS
src/index.ts
Imported renderDashboard() and added GET / route to return the dashboard; extended CORS allowed origins to include https://scrape.chitty.cc.
Tests
test/frontend.test.ts
Added Vitest suite asserting renderDashboard() output contains expected UI markers, API endpoint references, topology elements, and command-palette/keyboard bindings.
Dependency pins
package.json
Added overrides entry pinning undici to ^7.24.0 for dependency resolution.

Sequence Diagram

sequenceDiagram
    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
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 A little rabbit taps the key,
A dashboard wakes for all to see,
Cards and nodes in tidy rows,
Shortcuts hum and output flows,
Chittyscrape dances — ready, go!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main changes: adding a service registration payload and a dashboard frontend component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/dep-updates-and-housekeeping
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch chore/dep-updates-and-housekeeping

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 and usage tips.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🧹 Nitpick comments (4)
registration-payload.json (1)

42-42: Repository casing inconsistency.

The repository field uses CHITTYOS/chittyscrape while the PR URL shows chittyos/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 missing data-id attribute.

The card variable declared at line 856 is never used. Additionally, the selector .scraper-card[data-id="..."] won't match any elements because renderCards() doesn't set data-id on 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-label would 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*"([^"]*)"/g at 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

📥 Commits

Reviewing files that changed from the base of the PR and between 2b84015 and 5d51bc2.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • registration-payload.json
  • src/frontend.ts
  • src/index.ts
  • test/frontend.test.ts

Comment thread registration-payload.json
chitcommit and others added 2 commits March 19, 2026 01:35
…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>
@chitcommit chitcommit enabled auto-merge (squash) April 7, 2026 01:08
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