Repository navigation
feat(apps): add AppListItem and AppDetailPanel groups (#1261) - #1273
Conversation
Two presentational groups for the upcoming AppsScreen.
AppListItem (clients/web/src/components/groups/AppListItem/):
- Props { tool, selected, onClick }
- Renders tool.icons[0] (sized sm) when present, label (title ?? name),
two-line clamped description, and a trailing chevron affordance.
- Reuses ToolListItem's selected-state highlight (UnstyledButton bg via
--mantine-primary-color-light).
AppDetailPanel (clients/web/src/components/groups/AppDetailPanel/):
- Props { tool, formValues, isOpening, onFormChange, onOpenApp }
- Layout: optional icon + title row, optional description, divider,
SchemaForm bound to tool.inputSchema, full-width "Open App" button.
- "Open App" is disabled while isOpening or while any required input
field is empty (validation derived from tool.inputSchema.required).
- No annotations, progress, or cancel — execution is delegated to the
embedded app, not run as an MCP tool call from the panel.
Convention notes:
- Issue text references @tabler IconChevronRight / IconPlayerPlay; the
v2 web client already uses react-icons (md/ri namespaces), so this PR
uses MdChevronRight and MdPlayArrow for consistency rather than
introducing a second icon library.
Stories: AppListItem (Default, Selected, WithIcon, NoDescription, LongName);
AppDetailPanel (NoFields, SimpleStringParam, MultipleParams, WithIcon,
Opening, ComplexSchema).
Tests: 22 cases covering rendering branches, callback wiring, and the
disabled-button derivation. Per-file coverage 100% across lines,
statements, functions, and branches for both new components.
Closes #1261
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The Wikipedia-hosted PNG used in the AppListItem and AppDetailPanel WithIcon stories returned a broken image in Storybook (rate-limited / hot-link blocked). Replace it with an inline SVG sun icon as a data URI so the stories render offline, in Chromatic, and on any network. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
@claude review |
|
Claude finished @cliffhall's task in 1m 57s —— View job Code Review
Overall this is a clean, well-structured PR. The components are presentation-only, follow project conventions, have excellent test coverage, and Storybook stories are comprehensive. A few observations below:
|
- Extract resolveDisplayLabel(name, title?) to src/utils/toolUtils.ts and migrate all four call sites (AppListItem, AppDetailPanel, ToolListItem, ToolDetailPanel) to consume it. Avoids the fourth copy when the next list/detail screen arrives. Includes a small unit suite. - AppDetailPanel: only render the <Divider/> when the schema has at least one property — previously a no-input app showed an orphaned separator between the description and the Open App button. - AppDetailPanel: align PanelTitle truncate to `true` (matches the ItemLabel form used in AppListItem / ToolListItem); behaviorally identical, just less surprising for future readers. - AppDetailPanel: add an inline comment explaining that SchemaForm is disabled only while isOpening, not while validation fails — users should be able to keep filling required fields. The validation gate lives on the Open App button. - Extract the inline SUN_ICON_SVG data URI used by the WithIcon stories to src/test/fixtures/storyIcons.ts so the next story that needs it doesn't grow a third copy. - Tests: add the AppDetailPanel divider-conditional cases (rendered with fields, omitted without). Per-file coverage stays at 100% for AppListItem, AppDetailPanel, ToolListItem, ToolDetailPanel, and the new toolUtils. Suite: 70 files / 618 tests passing. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Thanks @claude — addressed in 2373945. 1. 2. 3. Always-rendered 4. 5. 6. Selected-state smoke test (acknowledged) — agreed; Mantine prop-derived background is a poor fit for happy-dom assertions. Visual regression will be Chromatic's job once the storybook play tests are wired into CI (#1251). 7. Suite is now 70 files / 618 tests passing; per-file coverage holds at 100% for AppListItem, AppDetailPanel, ToolListItem, ToolDetailPanel, and the new |
|
Claude finished @cliffhall's task in 51s —— View job Review of Follow-up Changes (commit 2373945)
All 7 items addressed cleanly. A few notes per item: 1. One trivial nit: 2. 3. Conditional 4. 5. 6. Selected-state smoke test — acknowledged; Chromatic is the right long-term solution. 7. LGTM. The only thing worth a one-word fix before merge is the test name nit in item 1, but it's purely cosmetic. Ready to merge otherwise. |
Drops the doubled "is ... is preserved" phrase in the test name. Behavior unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Fixed in 610744d — test name now reads |
Closes #1261.
Summary
Two presentation-only group components for the upcoming `AppsScreen`. Both consume real MCP `Tool` typing from `@modelcontextprotocol/sdk/types.js` and contain no store access.
`AppListItem`
`AppDetailPanel`
Convention note
The issue references the tabler icon names `IconChevronRight` / `IconPlayerPlay`. The v2 web client already standardized on `react-icons` (md/ri namespaces — see `SchemaForm.tsx` and others), so this PR uses `MdChevronRight` and `MdPlayArrow` rather than pulling in a second icon library. Happy to swap if reviewers prefer to standardize on tabler going forward — just flag it.
Stories
Tests / coverage
Test plan