Guided setup #45
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
URL: http://192.168.31.41:5173/alerts/sources
You have to remove the current "new source" button and in the "guided setup" button just put "+ New Source"
Claimed — branch
issue/45-guided-setup-new-source. Doing: on/alerts/sourcesremove the duplicate "New source" header button and retitle the guided-setup action to "+ New source" (plusIcon + "New source"), updating UC-FE-51/UC-FE-71 and the frontend test.Issue #45 — one "add source" entry point on /alerts/sources
Restated goal
/alerts/sources(dashboard/src/routes/alerts/sources/+page.svelte) renders two headeractions today:
Guided setup(outline,href="/alerts/sources/new") andNew source(primary,
onclick={startNew}— opens the inline draft form in the detail pane). Theoperator wants ONE: delete the plain
New sourceheader button and make the guided-setupbutton the add action, labelled "+ New Source". The guided setup page
(
/alerts/sources/new) is unchanged and remains the flow the button opens.Done for the operator: opening
/alerts/sourcesshows exactly one header action for addinga source; clicking it lands on
/alerts/sources/new.Interpretation of "+ New Source"
PageActionalways renders an icon before the label (PageAction.svelte), and every other"add" header action in the console is
icon={plusIcon}+ sentence-case label (New plan,New group). Writing the literal stringlabel="+ New Source"would render a double plus.So the header action becomes
icon={plusIcon}+label="New source", which reads"+ New source" on screen — the requested text, the repo's label convention, and
DESIGN.md's sentence-case rule. This is recorded in the report.Scope
Change:
dashboard/src/routes/alerts/sources/+page.svelte— delete theNew sourceheaderPageAction; retitle the guided-setupPageActiontoplusIcon+label="New source";drop the now-unused
bookOpenIconimport; bump the file headerLast.dashboard/src/lib/page-help.ts—/alerts/sourceshelp copy still names the button"Guided setup"; reword the one sentence; bump
Last.docs/use-cases/frontend/UC-FE-71-source-setup.md— Trigger + Main flow step 6 (thesources-page entry point is now a single "New source" action); bump
version:. Alsorewrite the "Guided setup" phrasing the UC keeps as the page name — the flow keeps that
name, the button does not.
docs/use-cases/frontend/UC-FE-51-sources.md— Main flow step 5 names "Guided setup";reword; bump
version:.dashboard/src/lib/usecases-frontend.test.ts— UC-FE-71 test currently asserts the pagecontains the literal
Guided setup; update it to the new contract (one header action,labelled
New source, linking to/alerts/sources/new). UC-FE-51'stoContain('New source')assertion still holds.
Not touching:
dashboard/src/routes/alerts/sources/new/+page.svelte— guided setup flow itself, itspage title, and
page-help.ts's/alerts/sources/newentry.startNew,DRAFT_ID,composing,the
SplitList.Placeholder"New source" button). The issue is about the header pair; theplaceholder's button only exists in the empty state and still opens the page's own inline
create form (UC-FE-51 step 3). Deleting it would remove an implemented, documented feature
that the issue does not name. Flagged in the report as the one residual judgement call.
middleware/,agent/,docs-site/,README.md,plans/, any nav/route file.UC decision
No new UC: no new route, handler, or page. Two existing UCs cover this surface and both
describe the header, so both get updated text +
version:bump:docs/use-cases/frontend/UC-FE-71-source-setup.md) — "Guided source setup",owns
[Trigger] Operator clicks Guided setup on /alerts/sourcesand Main flow step 6.Implementation cite stays
dashboard/src/routes/alerts/sources/new/+page.svelte(+ thesources page, already listed); Tests cite stays
dashboard/src/lib/usecases-frontend.test.ts(contains the UC id).docs/use-cases/frontend/UC-FE-51-sources.md) — "Sources page", Main flowstep 5 names the header's Guided setup link. Implementation cite stays
dashboard/src/routes/alerts/sources/+page.svelte; Tests cite unchanged.Ordered tasks
test -f /home/eduardez/workspace/gotoi-wt/meta/issue-45.plan.md && python3 $FJ comments 45.../sources/+page.svelte(delete duplicate, retitle, drop unused import, bumpLast)cd dashboard && bun run checkpage-help.tscopy for/alerts/sources+Lastcd dashboard && bun run checkpython3 docs/use-cases/_check.pycd dashboard && bun run test -- usecases-frontendpython3 docs/use-cases/_check.py; python3 scripts/check-ai-headers.py; python3 scripts/check-type-mirror.py; cd dashboard && bun run test; bun run check; bunx svelte-check --threshold error; rg -n 'Showing lines' --glob '!node_modules' --glob '!.git' .test -f /home/eduardez/workspace/gotoi-wt/meta/issue-45.report.mdOne commit per task from 2 onward (
dashboard: …,docs: …).Open questions (proceeding on the assumption)
Proceeding on the header one (the issue names a pair: "the current new source button and
the guided setup button"). Placeholder left as is; if the operator wanted the inline draft
gone too, that is a follow-up (delete
startNew/DRAFT_ID/composing, repoint theplaceholder) and is called out in the report.
"+ New source"); see Interpretation above.
Guided setupneed to survive as a discoverable name? — No: the route and its pagetitle ("Guided source setup") keep the name;
/alerts/sources/newis still the guided flow.Risk
expect(src).toContain('Guided setup')) → intended;task 5 rewrites it against the new contract. Fallback if the checker rejects the rewrite: revert
the UC wording to name both, keep the test asserting only
href="/alerts/sources/new".bun run checkunused-import error after droppingbookOpenIconusage → remove it from theimport list (already in task 2).
PageActionon the page → thepage has exactly one today; if
bun run testtrips, assert instead thatlabel="Guided setup"is absent and
href="/alerts/sources/new"present.page-helpcopy drift:docs-site/repeats "guided setup" in prose about the flow, which isstill correct; not touched.
DONE — Refs #45
Commit:
0b2aa37dashboard: single "New source" add action on /alerts/sources (branchissue/45-guided-setup-new-source, nothing pushed).What changed:
/alerts/sourcesheader now has ONE add action — the guided-setupPageActionretitled,icon={plusIcon}+label="New source"(renders "+ New source"; PageAction always draws the icon before the label, and every other add action here is plusIcon + sentence case). The duplicate plain "New source" header button is gone; its unusedbookOpenIconimport removed. The guided-setup page itself is unchanged.Also updated:
page-help.tscopy, UC-FE-51 + UC-FE-71 text and version, and the UC-FE-71 test (now assertshref="/alerts/sources/new"+label="New source", and nolabel="Guided setup").Gates, all exit 0:
python3 docs/use-cases/_check.py— 357 UCs conformpython3 scripts/check-ai-headers.py— 572 okpython3 scripts/check-type-mirror.py— cleancd dashboard && bun run test— 251 passed / 16 filescd dashboard && bun run check— 0 errorscd dashboard && bun run build— adapter-node build okrg -n "Showing lines"— hits only in pre-existing markdown quoting the rule; none in codeSmoke: rendered
/alerts/sourceson the worktree dev server (HTTP 200) — exactly one header action,New source→/alerts/sources/new, zeroGuided setup; throwaway dev account deleted after.Left deliberately: the empty-state placeholder's inline "New source" button (opens the page's own draft-create form, documented in UC-FE-51 step 3) — the issue names the header pair. Flagged in the report as the one call a human may want to revisit.
REVIEW: FIXED 1 — findings: issue requirement 1 satisfied at dashboard/src/routes/alerts/sources/+page.svelte:298 (single PageAction, duplicate "New source" header button removed, bookOpenIcon import dropped); requirement 2 satisfied as icon={plusIcon} label="New source" which renders "+ New source" — literal "+ New Source" would double-plus and DESIGN.md:61 mandates sentence case; plan Scope: all 5 in-scope files touched, 0 out-of-scope (git diff --stat = exactly those 5); gates reproduced: _check.py 357 UCs, check-ai-headers.py 572 ok, check-type-mirror.py 0, dashboard 251/16 tests, svelte-check 0 errors, adapter-node build ok, 'Showing lines' only in md quoting the rule; test integrity: UC-FE-71 test rewritten to the new contract (plan task 5), assertions strengthened — review commit
23f9728adds exactly-one-PageAction count the plan's contract required but the original rewrite omitted; UNFIXED: empty-state placeholder 'New source' button (line 530) left in place — issue names the header pair, and removing it would delete the documented inline-create path (UC-FE-51 step 3); operator call if they wanted that gone too.DONE — pushed. PR: #64 (targets agent-develop). Commits:
0b2aa37(implement),23f9728(review fix: asserts exactly one PageAction header). review: FIXED 1. Gates (orchestrator-run on final tree): docs/use-cases/_check.py 0 (357 UCs), check-ai-headers.py 0 (572 ok), check-type-mirror.py 0, dashboard bun run test 0, svelte-check 0 errors/7 pre-existing warnings, 'Showing lines' clean. Residual for operator: empty-state placeholder 'New source' button (inline draft-create, UC-FE-51 step 3) left in place — issue named the header pair; say the word and it goes too. Refs #45