Skip to content

feat(ui): favourite stacks list first (#377) - #422

Merged
p-i-p merged 1 commit into
mainfrom
feat/favourite-stacks
Nov 3, 2026
Merged

p-i-p merged 1 commit into
mainfrom
feat/favourite-stacks

Conversation

@p-i-p

@p-i-p p-i-p commented Nov 3, 2026

Copy link
Copy Markdown
Member

Favourite stacks: a star in a stack's sidebar row, or "Add to favourites" in its menu, marks it; favourites list first in the sidebar and in the stack switcher, the others below, each part in the chosen order (#377, ADR-0086).

Review card

The owner approved points 1–5 in the conversation on 2026-11-03 (with the plan).

# Category Point Beats Reversing costs
1 term A stack can be marked a favourite, by a star in its sidebar row or an entry in its menu; favourites list first, the others below, each part in the chosen order (name / last opened). A third order "favourites first", a separate "Favourites" heading, dragging. Low: the star and entry go, stored ids are ignored. Partly supersedes ADR-0084 point 1 ("beats favourites").
2 concept Marking or unmarking moves the stack at once: it is the user's own act on that row; opening still moves nothing while the page is open (ADR-0084 point 2 stands). Waiting for the next load. Low: UI code only.
3 contract Favourites live in the browser's localStorage (devstack.sidebar.favourites, a list of stack ids), as the order does; removing a stack from the dashboard drops it. A setting in the hub, per machine. Moving it to the hub later loses the per-browser values.
4 concept The top-bar stack switcher also lists favourites first (then running, then by name, as before); the command palette stays as it is. Sidebar only; the palette too. Low.
5 concept Hiding stacks (#377) stays open. Building it now. —

Decided on my own: the star sits at the right of the row, before "…" (the left keeps the fold toggle and the state dot); it shows on hover like "…" and always (filled) on a favourite; spelling "favourite" as in ADR-0084; a star icon (Lucide) in icons.ts.

Changes

  • ui/src/lib/stackOrder.ts: useFavourites(), forgetFavourite(); orderStacks takes the favourites and sorts them first.
  • ui/src/components/Sidebar.vue: the star button, the menu entry, forgetting on remove.
  • ui/src/components/StackSwitcher.vue: favourites first, with a small star.
  • ADR-0086, its index row (ADR-0084 point 1 amended), changelog.

Verification

  • npm run typecheck clean; vitest run: 137 passed (new: stackOrder.test.ts, Sidebar.test.ts).
  • Live against the mock hub (devstack, port 5199): starring shop moved it to the top at once with a filled star, it stayed first after a reload, and the switcher at phone width listed it first.

🤖 Generated with Claude Code

A star in a stack's sidebar row, or "Add to favourites" in its menu,
marks it; favourites list first in the sidebar and in the stack
switcher, the others below, each part in the chosen order. Marking
moves the stack at once. Favourites live in the browser's localStorage
(devstack.sidebar.favourites), as the order does (ADR-0086).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@p-i-p
p-i-p merged commit 8e4c7c0 into main Nov 3, 2026
@p-i-p
p-i-p deleted the feat/favourite-stacks branch November 3, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant