Redesign service view: unified entries, embedded UI, layout fixes #10
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_router#10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
Several improvements to how hero_inspector presents services — from how they're listed in autodiscovery to how individual service views are structured and how UIs are surfaced.
1. Unified service entries in autodiscovery
Current behavior: Each socket gets its own entry in the autodiscovered services list. So
hero_aibroker_serverandhero_aibroker_uiappear as two separate entries. Same for hero_os, hero_runner, hero_proxy, etc.Problem: These are not independent services — they are two halves of the same logical service. Having separate entries doubles the list and forces the user to navigate between them.
Proposed: One entry per logical service (e.g.,
hero_aibroker,hero_os,hero_runner,hero_proxy). The entry should:_serverand_uisockets togetherserver: ● healthy,ui: ● healthy)_uidetails are accessible via a "UI" tab within the service view (see section 3 below)2. Remove redundant socket path line
Current behavior: The service detail view shows a line like:
Problem: The service header already displays the socket path. This line is redundant.
Proposed: Remove this line from the service detail body.
3. Embed UI in service view via iframe
Since we're unifying
_serverand_uiinto one entry, the UI needs a home.Proposed: Add a "UI" tab alongside the existing Methods / Markdown / etc. tabs. This tab contains an iframe that loads the service's admin UI via the proxy (e.g.,
http://127.0.0.1:9998/hero_aibroker_ui). This gives instant access to the service dashboard without leaving the inspector.4. UI path discovery and status
Go further than just embedding the UI — actively discover what's available.
Proposed: Add a "UI Paths" section (could be a sub-tab or panel within the UI tab) that:
/,/status,/settings,/rpc, etc.)This could work by:
<a href>links5. Methods/Markdown tabs: card container with scroll
Current behavior: The Methods, Markdown, and other content tabs render their content directly in the page. Long content overflows the viewport and the entire page scrolls.
Problem: On services with many RPC methods or long documentation, the tabs and header scroll out of view. The user loses navigation context.
Proposed: Wrap the tab content area in a card (or equivalent container) with:
calc(100vh - <header_height>))overflow-y: autoon the content area so it scrolls within the cardSummary of Changes
Implemented in commit
fa5c409ondevelopmentbranch.Changes
Unified sidebar entries —
_serverand_uisockets now appear as a single grouped entry with dual status badges (server/UI health shown compactly). Uses existingderive_group_name()logic.Removed redundant socket path notice — The "This service serves an HTML interface..." card has been removed from the service detail view.
Embedded UI tab — New "UI" tab with an iframe that loads the admin UI via the existing proxy (
/{group_name}_ui). Lazy-loads on first tab show. For web-only services (no OpenRPC), the UI tab is the default active tab.UI path discovery — New
GET /api/ui-routes/:service_nameendpoint that fetches the root page, extractshreflinks, and checks HTTP status of each path. Triggered via "Discover routes" button in the UI tab.Scrollable tab content — Header card and tab bar are now pinned while tab content scrolls independently via flex layout. Sidebar also scrolls independently within its column.
Files changed
routes.rs—SidebarGroupstruct,build_sidebar_groups(),ui_routes_handler(), new routes, strippedx-frame-optionsin proxysidebar.html— Grouped entries with dual status badgesservice.html— Removed web notice, added UI tab with iframe + route discovery, scroll wrapperbase.html— Updated URL regex forui/service-logstabsindex.html— Flex layout with viewport heightdashboard.css— Scroll wrapper, iframe, dual-badge styles