feat(console): improve empty states for Jobs, Scheduler, Plugins, and MCP#287
Open
feat(console): improve empty states for Jobs, Scheduler, Plugins, and MCP#287
Conversation
… MCP pages - **Jobs**: show a centered empty state with description and "New Job" CTA when the board has no jobs at all, instead of showing five empty columns - **Scheduler**: replace bare "No scheduled work yet." with a centered CTA that includes a description and "New job" button; hide the editor panel on the right until the user clicks "New job" or selects an existing job - **Plugins**: distinguish between "no plugins installed" (shows description + documentation link) and "filter matches nothing" (keeps existing message) - **MCP**: when no servers are configured show a full-page centered empty state with description and "Add your first server" CTA instead of immediately rendering the editor form; once at least one server exists the normal list + editor layout is used - **CSS**: add `.jobs-board-empty` (full-page centered) and `.empty-state-cta` (panel-level centered with border) utility classes used by the new empty states
When an integration (slack, discord, telegram, etc.) is not present in the config object at all, the describe* functions in channels-catalog.ts would crash with "Cannot read properties of undefined". Use optional chaining and nullish coalescing throughout so each function safely returns an "available / not configured" state when its config section is absent rather than throwing. Exposed by the scheduler page on instances without Slack configured.
- Rename .jobs-board-empty to .page-empty (was also used on MCP page) - Extract openNewServer() and openNewJob() callbacks to remove 5 inline triple-setter duplications across mcp.tsx and scheduler.tsx - Fix mcp.tsx empty-state condition: guard with !mcpQuery.isError so a fetch error no longer silently shows the "Add your first server" CTA - Deduplicate URLSearchParams parse in scheduler.tsx useState initializers
Member
Author
Code reviewFound 3 issues:
hybridclaw/console/src/routes/channels-catalog.ts Lines 62 to 70 in 4d4dd86
hybridclaw/console/src/routes/channels-catalog.ts Lines 98 to 110 in 4d4dd86
hybridclaw/console/src/routes/mcp.tsx Lines 127 to 138 in 4d4dd86 🤖 Generated with Claude Code If this code review was useful, please react with 👍. Otherwise, react with 👎. |
- describeDiscord: replace ineffective `?? false` with explicit `config.discord ? ... : false` guard so enabled=false (not true) when discord config section is absent - describeWhatsApp: same fix; without it a linked-but-unconfigured device showed as active with "groups undefined" in the summary - mcp.tsx: call setShowEditor(false) in deleteMutation.onSuccess so deleting the last server collapses back to the full-page empty state
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR replaces bare, low-information empty states across four admin console pages with helpful, actionable alternatives that include a description of what the page is for and a clear CTA. A pre-existing crash in
channels-catalog.tswas found and fixed during browser verification.Jobs (
/admin/jobs)/admin/scheduler, same as the existing header button).Scheduler (
/admin/scheduler)Plugins (
/admin/plugins)hybridclaw.io/docs/extensibility/plugins).MCP (
/admin/mcp)CSS additions (
styles.css)Two new utility classes following the project's existing conventions:
.jobs-board-empty— full-page centered flex layout (used for Jobs board-level and MCP page-level empty states)..empty-state-cta— panel-level centered bordered block with description + CTA button (used inside list panels for Scheduler and MCP).Bugfix:
channels-catalog.tscrash on missing integration keysDuring browser testing, the Scheduler page crashed with
Cannot read properties of undefined (reading 'enabled')indescribeSlack. Thedescribe*functions assumed every integration key (slack,discord,telegram, etc.) is always present in the config object, but they are absent when the integration has never been configured. Fixed all seven functions with optional chaining and nullish coalescing so they return an "available / not configured" state gracefully.Test plan
/admin/jobs— no jobs → centered empty state with "New Job" button; clicking goes to/admin/scheduler. Verified in browser./admin/scheduler— no jobs → list shows CTA; editor panel is hidden. Clicking "New job" (header or CTA) reveals the editor. Verified in browser./admin/plugins— no plugins → description + docs link in registry panel. Verified in browser./admin/mcp— no servers → full-page centered empty state; "Add your first server" opens the editor. Verified in browser./admin/jobswith some jobs — kanban renders normally; empty columns show the dashed "No jobs" placeholder./admin/schedulerwith existing jobs — list renders, clicking a job opens the editor./admin/pluginswith plugins but an active filter matching nothing — "No plugins match this filter." shown (not the docs CTA)./admin/mcpwith servers — normal list + editor layout with "New server" header button./admin/channels— channel catalog renders without crash on instances where some integrations are absent from config.