From 25c853dea8dc9d63d783521a1ad62cdc3cefb5c0 Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 30 Jul 2026 14:25:34 +0800 Subject: [PATCH] docs: define compact fleet cards --- .../2026-07-30-compact-fleet-cards-design.md | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 docs/superpowers/specs/2026-07-30-compact-fleet-cards-design.md diff --git a/docs/superpowers/specs/2026-07-30-compact-fleet-cards-design.md b/docs/superpowers/specs/2026-07-30-compact-fleet-cards-design.md new file mode 100644 index 0000000..d3ff8f5 --- /dev/null +++ b/docs/superpowers/specs/2026-07-30-compact-fleet-cards-design.md @@ -0,0 +1,56 @@ +# Compact Fleet Cards Design + +**Date:** 2026-07-30 + +**Status:** Approved + +## Intent + +Increase the Fleet workbench's information density without moving the desktop overview and search out of the left sidebar. Remove the aggregate health strip because its fleet-wide CPU, memory, temperature, SMS, and online-rate values do not support the operator's primary workflow. Restore the upstream SimAdmin version to each instance card. + +## Layout Contract + +- The desktop overview and search remain in the left sidebar. +- The results pane starts with the existing node-group tabs, followed by the result count, sort control, and card matrix. +- The entire `节点资源健康` strip is removed, including online rate, average CPU, average memory, highest temperature, and SMS channel count. +- The card matrix uses explicit viewport contracts: 1 column at 390px, 2 at 768px, 2 at 1024px, 4 at 1440px, and 5 at 1920px. +- Cards continue to fill their grid tracks so the results pane has no artificial side gutters or fixed-width card gaps. + +## Card Contract + +- Keep the current warm, shadowless telemetry-card visual language: cream surface, warm hairline border, brown typography, mint status accents, and restrained interaction feedback. +- Keep identity, status, batch selection, and the accessible action menu in the header. +- Render the upstream version beneath the instance name as `SimAdmin `. +- When the upstream resource summary has no version, render `版本未知`; do not confuse the instance configuration revision with the SimAdmin version. +- Keep per-instance origin, tags, capabilities, phone number, maximum temperature, CPU, memory, and latest SMS because these values support node-level diagnosis. +- Preserve truncation and wrapping safeguards for narrow cards. The origin and long names may truncate with their full values available through existing accessible names or titles; hardware values must remain readable. + +## Version Data Flow + +The API resource endpoint already returns the upstream SimAdmin version. The observed local response from `/api/v1/instances/:id/resources` contains `version: "1.1.6"`. The API resource service, web data source, and Fleet view model already preserve this field. The defect is isolated to card rendering, which currently omits `row.version`. + +The implementation therefore adds no new endpoint or fallback parser. It renders `row.version` in the identity area and tests the existing API-to-view-model contract to prevent another presentation-layer omission. + +## Responsive Behavior + +- At 390px the page remains a single card column. +- At 768px the stacked workspace uses two columns. +- At 1024px the left sidebar remains visible and the results pane uses two columns to protect minimum readable card width. +- At 1440px the results pane uses four compact columns. +- At 1920px it uses five compact columns. +- Menus, tags, telemetry rows, phone numbers, temperatures, and version labels must stay within card and viewport bounds. + +## Testing + +- Component tests assert the aggregate health region is absent. +- Component and integration tests assert a resource version renders as `SimAdmin 1.1.6` and a missing version renders as `版本未知`. +- Existing card navigation, menu, selection, restart, resource, and SMS tests remain green. +- Real Chrome E2E asserts the 1/2/2/4/5 column contract at 390/768/1024/1440/1920 and checks version/card geometry. +- Screenshots are reviewed at mobile and desktop widths for wrapping, overlap, excess whitespace, and accidental sidebar movement. + +## Out Of Scope + +- No API contract or database changes. +- No changes to instance-detail telemetry. +- No removal of per-instance CPU, memory, temperature, phone, or SMS data. +- No movement of overview or search controls into the results pane.