diff options
| author | Adam Malczewski <[email protected]> | 2026-06-28 13:18:49 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-28 14:41:18 +0900 |
| commit | 60aa5dc48b6af502f88befd7d1517ab52cf6c60f (patch) | |
| tree | 4d4ea1eafed3ce0e56f67b23f1776f96f7f506bc /src/features/workspaces/index.ts | |
| parent | a59200e786f7d97d7ba5b9cd2bee9ffef531dac2 (diff) | |
| download | dispatch-web-60aa5dc48b6af502f88befd7d1517ab52cf6c60f.tar.gz dispatch-web-60aa5dc48b6af502f88befd7d1517ab52cf6c60f.zip | |
feat(workspaces): star toggle for concurrency priority
Backend (feature/workspace-star) shipped Workspace.starred: boolean (additive
to [email protected], no version bump) + PUT/DELETE /workspaces/:id/star endpoints
(no body; create-on-miss; return the updated Workspace). A starred workspace's
agents jump ahead of non-starred ones in the concurrency limiter queue
(oldest-agent-first within each group); takes effect immediately for
already-queued agents.
FE consumed:
- adapter/http.ts: star(id)/unstar(id) -> WorkspaceResult<Workspace>
(PUT/DELETE /workspaces/:id/star, no body).
- logic/view-model.ts: pure sortWorkspaces (starred-first, then lastActivityAt
desc, stable) + pure applyStarred (the optimistic apply/revert transform).
- store.svelte.ts: setStarred(id, starred) — optimistic flip with error revert;
the list is now a $derived sorted view (starred bubble to top reactively);
no full refresh on success (avoids flicker).
- ui/WorkspaceCard.svelte: star toggle button (filled gold when starred,
outline when not; spinner in flight; aria-pressed/aria-label; tooltip notes
concurrency priority).
- Re-mirrored .dispatch/wire.reference.md (starred + delta note).
- GLOSSARY.md: 'starred' term.
Tests (+27): http star/unstar (5), view-model sort+applyStarred (12), store
optimistic+revert+re-sort (6), WorkspaceCard star button (4).
Verification: typecheck 0/0, 1045 tests green, biome clean, build OK.
backend-handoff.md updated (workspace-star slice, no open backend asks).
Diffstat (limited to 'src/features/workspaces/index.ts')
| -rw-r--r-- | src/features/workspaces/index.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/features/workspaces/index.ts b/src/features/workspaces/index.ts index 177e49b..dab1dec 100644 --- a/src/features/workspaces/index.ts +++ b/src/features/workspaces/index.ts @@ -8,7 +8,7 @@ export { WORKSPACE_SLUG_RE, workspacePath, } from "./logic/route"; -export { pageTitle, relativeTime } from "./logic/view-model"; +export { applyStarred, pageTitle, relativeTime, sortWorkspaces } from "./logic/view-model"; export type { WorkspaceStore } from "./store.svelte"; export { createWorkspaceStore } from "./store.svelte"; export { default as WorkspaceCard } from "./ui/WorkspaceCard.svelte"; |
