Repository navigation
refactor: rename /scopes route to /work-items + CI workflow tidy - #42
Merged
Merged
Conversation
Aligns the web UI with the renamed artifact noun (PR #40 moved the CLI from `stax plans` to `stax work-items`). The user-visible URLs, nav rail labels, page identifiers, and the HTTP API the page TS consumes all migrate together so the naming axis is one consistent "work item" everywhere. Frontend: - Page files: scopes.html → work-items.html, scope.html → work-item.html; scopes.ts → work-items.ts, scope.ts → work-item.ts. Layout block-helper args (title/page/active) updated to match. - Nav rail (header.html + mobile-nav.html): "Scopes" → "Work items"; href /scopes → /work-items; data-active-key follows. Flag icon kept. - Detail page back-link, list-page empty-state, home-page card + Latest section, /search results section, and all DOM ids that embedded "scope" (`#scope-icon`, `#scope-title`, `#scope-body`, `#scopes-list`, `#latest-scopes`, `tpl-scope`, `tpl-scope-link`) renamed to the work-item equivalents. - Page dispatcher in bundle.ts uses bracketed keys for the kebab-cased page names; vite.config.ts pages array follows. - Internal hrefs `/scope?id=…` → `/work-item?id=…` across home.ts, search.ts, system.ts. - CSS: `.scope-body` → `.work-item-body`. HTTP API + Go server: - /api/scopes → /api/work-items, /api/scope → /api/work-item; apiScopesPath/apiScopePath constants renamed. - Handler renames: handleAPIScopes → handleAPIWorkItems, handleAPIScope → handleAPIWorkItem; readScopesForAPI → readWorkItemsForAPI. - Struct renames (with collision resolution): scopeListItem → workItemListItem, scopesListResponse → workItemsListResponse, scopeRelation → workItemRelation, scopeDetail → workItemDetail. The previous `workItemDetail` (per-system-row inner type used by /api/systems?id=) renames to `systemWorkItem` to free the better name for the detail response. - JSON wire keys: `"scopes"` → `"workItems"` on statsResponse, workItemsListResponse, searchResponse, and systemEntry. Frontend TS types follow. Tests / docs: - server_test.go: clean-URL fallback expects /work-items and /work-item; every fixture/assertion updated to body.WorkItems and `"workItems":` wire shape. - scripts/e2e_test.sh + e2e_test.ps1: curl + assert_contains paths and JSON-key substring assertions updated. - AGENTS.md: frontend hard rules now reference /work-item URL, #work-item-body, active="work-items", and {workItems: [...]}. - frontend/package-lock.json: regenerated with `npm install --include=optional` (same pre-existing @emnapi gap PR #40 hit). Verified locally: go vet + go test clean, npm run check clean, scripts/e2e_test.sh 624/624 cases pass. Signed-off-by: Tanzim Saqib <[email protected]>
tsaqib
force-pushed
the
frontend-work-items-routes
branch
from
May 29, 2026 03:48
fdf31ed to
cf8d315
Compare
User-driven rename of the test workflow names — the two top-level workflows (Linux and Windows) now share an E2E test prefix for visual grouping in the GitHub Actions sidebar. Signed-off-by: Tanzim Saqib <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #40 that finishes the rename on the web side. The user-visible URLs, nav rail labels, page identifiers, and the HTTP API the page TS consumes all migrate to the work item noun together so the naming axis is one consistent term everywhere. The flag icon and its tinting convention (lifecycle +
hasOpenTasks) are unchanged.A small drive-by also renames the two top-level CI workflows under a shared
E2E testprefix so they group visually in the Actions sidebar.What changed
Frontend pages and routing
scopes.html→work-items.html,scope.html→work-item.html;scopes.ts→work-items.ts,scope.ts→work-item.ts. Layout block-helper args (title/page/active) updated to match.header.html+mobile-nav.html): labelScopes→Work items; href/scopes→/work-items;data-active-keyfollows. Flag icon kept./searchresults section, and all DOM ids that embedded "scope" (#scope-icon,#scope-title,#scope-body,#scopes-list,#latest-scopes,tpl-scope,tpl-scope-link) renamed to the work-item equivalents.bundle.tsuses bracketed keys for the kebab-cased page names;vite.config.tspages array follows./scope?id=…→/work-item?id=…acrosshome.ts,search.ts,system.ts..scope-body→.work-item-body.HTTP API and Go server
/api/scopes→/api/work-items,/api/scope→/api/work-item;apiScopesPath/apiScopePathconstants renamed.handleAPIScopes→handleAPIWorkItems,handleAPIScope→handleAPIWorkItem;readScopesForAPI→readWorkItemsForAPI.scopeListItem→workItemListItem,scopesListResponse→workItemsListResponse,scopeRelation→workItemRelation,scopeDetail→workItemDetail. The previousworkItemDetail(per-system-row inner type used by/api/systems?id=) renames tosystemWorkItemto free the better name for the detail response."scopes"→"workItems"onstatsResponse,workItemsListResponse,searchResponse, andsystemEntry. Frontend TS types follow.Tests and docs
server_test.go: clean-URL fallback now expects/work-itemsand/work-item; every fixture/assertion updated tobody.WorkItemsand"workItems":wire shape.scripts/e2e_test.sh+e2e_test.ps1:curl+assert_containspaths and JSON-key substring assertions updated.AGENTS.md: frontend hard rules now reference/work-itemURL,#work-item-body,active="work-items", and{workItems: [...]}.frontend/package-lock.json: restored fromorigin/main(which has the@emnapi/*peer-dep fix from PR refactor: renamestax planstostax work-items#40) — my localnpm install --include=optionalre-pruned them on this platform, same pattern PR refactor: renamestax planstostax work-items#40 hit.CI workflow rename (drive-by)
.github/workflows/windows-cli.yml→test-windows.yml;name:strings updated toE2E test(Linux) andE2E test / windows(Windows). Both files keep their existing triggers and steps verbatim — only the names move.Commits
refactor(frontend): rename /scopes route to /work-items— the bulk of the change above.fix(frontend): include @emnapi/* in lock for cross-platform npm ci(lock-file restore) — folded into commit 1 via amend; surfaces as a single squashed commit on merge.chore(ci): rename test workflows to E2E test naming— the workflow drive-by.Test plan
go vet ./...cleango test ./...cleannpm run checkclean (typecheck + Biome + Knip)npm run buildcleanscripts/e2e_test.sh624/624 cases pass locally/, click nav rail → lands on/work-items; open a work item → URL is/work-item?id=…; flag icon still tints (deprecated / superseded / open-tasks); back-link returns to list;/searchstill groups results under "Work items" + "Systems"