-
Notifications
You must be signed in to change notification settings - Fork 2
[DevHud UI] Redesign Deck for scan-first pull request review #871
Description
Summary
Redesign DevHud Deck for scan-first pull-request review. Move Deck selection, Create, Refresh, last-success status, and PR results into the primary workspace; place existing configuration in a desktop side panel and a mobile sheet.
Depends on the shared shell and design foundation: #869
This is a UI-only Task. Preserve existing query, settings, GitHub access, polling, caching, lifecycle, notifications, deep links, widget snapshots/privacy confirmation, persistence, and error behavior.
Evidence
- Investigated revision:
aebc672366537fa12dae0c04de33d96e2b8fff6d, matching freshly fetchedmainon 2026年08月30日. - The current Deck surface orders Deck navigation, inline editor, Refresh/Delete/widget actions, statuses, and then results:
apps/devhud/src/deck-ui.tsx. - The persisted field set is already closed to name, credential profile, query/builder, group, drafts, refresh, and notifications:
apps/devhud/src/settings-contract.ts. - Existing rows contain repository, number, title, state/draft, review, checks, author, labels, and updated time:
apps/devhud/src/deck-ui.tsx. - Existing state maps distinguish missing token/secure storage, permission, invalid query, network, rate limit, incomplete results, stale cache, offline, loading, and empty results:
apps/devhud/src/deck-ui.tsx,apps/devhud/src/deck-ui.tsx. - Polling remains active/online client work and scheduled Decks continue independently of visible surface:
apps/devhud/src/deck-ui.tsx. - Deep-link handling and updater-approval deferral are owned by the shell:
apps/devhud/src/App.tsx. - Deck and widget constraints are authoritative in the DevHud foundation contract and #815.
- Duplicate searches for Deck UI redesign, PR results UI, and DevHud UI found no open match. Closed devhud: add client-initiated Deck PR monitoring and native widgets #755 and implemented PR feat(devhud): add local GitHub Decks #839 are history, not this presentation-only work.
Current Gap
All configuration fields appear before results, so recurring review work must traverse setup before reaching the PR list. Selection, refresh, last-success, stale/error status, and results are visually distributed, and mobile stacks the same inline editor before results instead of prioritizing review.
Proposed Scope
- Reuse the foundation issue's
PageHeader,Card,Button,Field,StatusBadge,StatePanel,Dialog/Sheet, andDataRowprimitives. - Put Deck selector, Create Deck, manual Refresh, and last successful refresh in the top workspace.
- Present results as semantic, scan-friendly rows containing the existing repository, number, title, author, state/draft, review, checks, labels, and updated time. Preserve current GitHub result order, grouping, and draft filtering.
- Move configuration to a right-side desktop panel and an explicitly opened, focus-managed mobile sheet.
- Expose only current settings: name, credential profile, raw query/query builder, refresh interval, group, show drafts, and notifications.
- Preserve existing validation, repository access checks, synchronized settings/revision path, Delete, read-only state, Deck limit, missing-deep-link recovery, and widget privacy confirmation.
- On dismissal, discard only the existing unsaved editor values; do not invent new persistence or auto-save behavior.
- Distinguish fresh, stale cache, offline with cache, offline without cache, initial loading, rate limit, incomplete results, missing PAT/secure storage, permission, invalid query, and empty results with text/icon cues.
- Preserve active-client polling cancellation, cache/backoff, notification, deep-link, native widget snapshot, selected credential, and privacy behavior.
- Update
docs/apps-devhud-foundation.mdanddocs/project-devhud.mdwith the resulting internal Deck composition.
Acceptance Criteria
- Selected Deck, Create, Refresh, and last successful refresh appear with the primary results workspace.
- Desktop configuration uses a right panel and mobile uses an accessible settings sheet; both render exactly the same supported field set and validation.
- The mobile sheet has an accessible name, focus containment, Escape/back close, and opener focus restoration.
- PR rows expose repository, number, title, author, state/draft, review, and checks using text/icons in addition to color, while retaining labels and updated time.
- Existing grouping,
showDrafts, GitHub order, query builder/raw-query modes, repository validation, and save behavior are unchanged. - Cached results remain visible through offline/failure states and are marked stale with last-success information.
- Offline without cache is Offline rather than Empty; initial uncached refresh is Loading rather than Empty; a successful zero-result response is Empty.
- Missing PAT, secure-storage failure, permission, invalid query, rate limit, incomplete results, and general network failure remain distinct.
- Polling cancellation/lifecycle, deep links, notifications, cache, widget snapshot, and widget privacy confirmation pass existing regressions unchanged.
- English/Korean and light/dark work at ×ばつ900, ×ばつ768, ×ばつ844, 320px, and 200% zoom.
- No new Deck field, sort/filter, API, protobuf, settings schema, bridge, GitHub request, polling, cache, notification, deep-link, or widget behavior is introduced.
Test Scenarios
- Render zero profiles, one configured Deck, several Decks, and the 25-Deck limit; assert selector, Create availability, empty/setup state, and selected results workspace.
- Render PR fixtures covering open/draft/merged/closed, approved/changes-requested/required/no-review, and pending/success/failure/no-check; assert semantic row labels and unchanged grouping/filtering.
- Exercise desktop panel and ×ばつ844 mobile sheet edit/save/cancel with invalid
is:pr, missing repository, Boolean-query builder disablement, and read-only settings. - Render fresh cache, cached stale offline, uncached offline, uncached loading, missing PAT, secure storage, permission, rate limit, incomplete, invalid-query, and empty-success fixtures; assert exact state/action distinctions.
- Trigger manual Refresh and assert the existing refresh/polling path is used and duplicate refresh is disabled while loading.
- Exercise exact Deck deep links, missing Deck return action, and updater-approval deferral.
- Open the widget privacy alert dialog by keyboard and verify content, Escape, focus containment/restoration, and unchanged enable/disable behavior.
- Check English/Korean, light/dark, keyboard-only, high contrast, reduced motion, ×ばつ900, ×ばつ768, ×ばつ844, 320px, and 200% zoom.
- Run
pnpm --filter devhud testandpnpm --filter devhud verify:pins, including existing Deck, widget, localization, accessibility, deterministic-build, CSP, and mobile-closure tests.
Out of Scope
- New Deck fields, filters, sort orders, result attributes, server polling, webhook/push, or API-side result storage.
- GitHub request/query/cache/backoff/notification/widget/deep-link behavior changes.
- Settings schema, API, protobuf, or native bridge changes.
- Requested reviewer, mergeability, analytics, feeds, or other unimplemented result data.
- Reimplementing the shared shell, tokens, or generic components owned by the dependency issue.