Guided setup #45

Closed
opened 2026-10-06 23:15:34 +02:00 by EduarD3V · 5 comments
Owner

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"

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"
gotoi-agent added reference issue/45-guided-setup-new-source 2026-10-07 16:59:51 +02:00
Collaborator

Claimed — branch issue/45-guided-setup-new-source. Doing: on /alerts/sources remove 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.

Claimed — branch `issue/45-guided-setup-new-source`. Doing: on `/alerts/sources` remove 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.
Collaborator

Issue #45 — one "add source" entry point on /alerts/sources

Restated goal

/alerts/sources (dashboard/src/routes/alerts/sources/+page.svelte) renders two header
actions today: Guided setup (outline, href="/alerts/sources/new") and New source
(primary, onclick={startNew} — opens the inline draft form in the detail pane). The
operator wants ONE: delete the plain New source header button and make the guided-setup
button 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/sources shows exactly one header action for adding
a source; clicking it lands on /alerts/sources/new.

Interpretation of "+ New Source"

PageAction always 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 string label="+ 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 the New source header
    PageAction; retitle the guided-setup PageAction to plusIcon + label="New source";
    drop the now-unused bookOpenIcon import; bump the file header Last.
  • dashboard/src/lib/page-help.ts — /alerts/sources help 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 (the
    sources-page entry point is now a single "New source" action); bump version:. Also
    rewrite 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 page
    contains the literal Guided setup; update it to the new contract (one header action,
    labelled New source, linking to /alerts/sources/new). UC-FE-51's toContain('New source')
    assertion still holds.

Not touching:

  • dashboard/src/routes/alerts/sources/new/+page.svelte — guided setup flow itself, its
    page title, and page-help.ts's /alerts/sources/new entry.
  • The inline draft-create path in the detail pane (startNew, DRAFT_ID, composing,
    the SplitList.Placeholder "New source" button). The issue is about the header pair; the
    placeholder'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.
  • No new dependencies, no new component, no new branch.

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:

  • UC-FE-71 (docs/use-cases/frontend/UC-FE-71-source-setup.md) — "Guided source setup",
    owns [Trigger] Operator clicks Guided setup on /alerts/sources and Main flow step 6.
    Implementation cite stays dashboard/src/routes/alerts/sources/new/+page.svelte (+ the
    sources page, already listed); Tests cite stays
    dashboard/src/lib/usecases-frontend.test.ts (contains the UC id).
  • UC-FE-51 (docs/use-cases/frontend/UC-FE-51-sources.md) — "Sources page", Main flow
    step 5 names the header's Guided setup link. Implementation cite stays
    dashboard/src/routes/alerts/sources/+page.svelte; Tests cite unchanged.

Ordered tasks

# Task Verify command
1 Plan written; claim comment posted test -f /home/eduardez/workspace/gotoi-wt/meta/issue-45.plan.md && python3 $FJ comments 45
2 Header action change in .../sources/+page.svelte (delete duplicate, retitle, drop unused import, bump Last) cd dashboard && bun run check
3 page-help.ts copy for /alerts/sources + Last cd dashboard && bun run check
4 UC-FE-71 + UC-FE-51 text/version python3 docs/use-cases/_check.py
5 UC-FE-71 test updated to the new contract cd dashboard && bun run test -- usecases-frontend
6 Full gates python3 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' .
7 Report + Done comment test -f /home/eduardez/workspace/gotoi-wt/meta/issue-45.report.md

One commit per task from 2 onward (dashboard: …, docs: …).

Open questions (proceeding on the assumption)

  1. Is the "new source" button the header one or the empty-state placeholder one? —
    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 the
    placeholder) and is called out in the report.
  2. Literal label "+ New Source"? — Proceeding on plus icon + "New source" (screen shows
    "+ New source"); see Interpretation above.
  3. Does Guided setup need to survive as a discoverable name? — No: the route and its page
    title ("Guided source setup") keep the name; /alerts/sources/new is still the guided flow.

Risk

  • UC test fails on the removed literal (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 check unused-import error after dropping bookOpenIcon usage → remove it from the
    import list (already in task 2).
  • Header action count assertion brittle if another control uses PageAction on the page → the
    page has exactly one today; if bun run test trips, assert instead that label="Guided setup"
    is absent and href="/alerts/sources/new" present.
  • page-help copy drift: docs-site/ repeats "guided setup" in prose about the flow, which is
    still correct; not touched.
# Issue #45 — one "add source" entry point on /alerts/sources ## Restated goal `/alerts/sources` (`dashboard/src/routes/alerts/sources/+page.svelte`) renders two header actions today: `Guided setup` (outline, `href="/alerts/sources/new"`) and `New source` (primary, `onclick={startNew}` — opens the inline draft form in the detail pane). The operator wants ONE: delete the plain `New source` header button and make the guided-setup button 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/sources` shows exactly one header action for adding a source; clicking it lands on `/alerts/sources/new`. ## Interpretation of "+ New Source" `PageAction` always 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 string `label="+ 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 the `New source` header `PageAction`; retitle the guided-setup `PageAction` to `plusIcon` + `label="New source"`; drop the now-unused `bookOpenIcon` import; bump the file header `Last`. - `dashboard/src/lib/page-help.ts` — `/alerts/sources` help 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 (the sources-page entry point is now a single "New source" action); bump `version:`. Also rewrite 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 page contains the literal `Guided setup`; update it to the new contract (one header action, labelled `New source`, linking to `/alerts/sources/new`). UC-FE-51's `toContain('New source')` assertion still holds. Not touching: - `dashboard/src/routes/alerts/sources/new/+page.svelte` — guided setup flow itself, its page title, and `page-help.ts`'s `/alerts/sources/new` entry. - The inline draft-create path in the detail pane (`startNew`, `DRAFT_ID`, `composing`, the `SplitList.Placeholder` "New source" button). The issue is about the header pair; the placeholder'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. - No new dependencies, no new component, no new branch. ## 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: - **UC-FE-71** (`docs/use-cases/frontend/UC-FE-71-source-setup.md`) — "Guided source setup", owns `[Trigger] Operator clicks Guided setup on /alerts/sources` and Main flow step 6. Implementation cite stays `dashboard/src/routes/alerts/sources/new/+page.svelte` (+ the sources page, already listed); Tests cite stays `dashboard/src/lib/usecases-frontend.test.ts` (contains the UC id). - **UC-FE-51** (`docs/use-cases/frontend/UC-FE-51-sources.md`) — "Sources page", Main flow step 5 names the header's Guided setup link. Implementation cite stays `dashboard/src/routes/alerts/sources/+page.svelte`; Tests cite unchanged. ## Ordered tasks | # | Task | Verify command | |---|---|---| | 1 | Plan written; claim comment posted | `test -f /home/eduardez/workspace/gotoi-wt/meta/issue-45.plan.md && python3 $FJ comments 45` | | 2 | Header action change in `.../sources/+page.svelte` (delete duplicate, retitle, drop unused import, bump `Last`) | `cd dashboard && bun run check` | | 3 | `page-help.ts` copy for `/alerts/sources` + `Last` | `cd dashboard && bun run check` | | 4 | UC-FE-71 + UC-FE-51 text/version | `python3 docs/use-cases/_check.py` | | 5 | UC-FE-71 test updated to the new contract | `cd dashboard && bun run test -- usecases-frontend` | | 6 | Full gates | `python3 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' .` | | 7 | Report + Done comment | `test -f /home/eduardez/workspace/gotoi-wt/meta/issue-45.report.md` | One commit per task from 2 onward (`dashboard: …`, `docs: …`). ## Open questions (proceeding on the assumption) 1. *Is the "new source" button the header one or the empty-state placeholder one?* — 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 the placeholder) and is called out in the report. 2. *Literal label "+ New Source"?* — Proceeding on plus icon + "New source" (screen shows "+ New source"); see Interpretation above. 3. *Does `Guided setup` need to survive as a discoverable name?* — No: the route and its page title ("Guided source setup") keep the name; `/alerts/sources/new` is still the guided flow. ## Risk - **UC test fails on the removed literal** (`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 check` unused-import error** after dropping `bookOpenIcon` usage → remove it from the import list (already in task 2). - **Header action count assertion brittle** if another control uses `PageAction` on the page → the page has exactly one today; if `bun run test` trips, assert instead that `label="Guided setup"` is absent and `href="/alerts/sources/new"` present. - **`page-help` copy drift**: `docs-site/` repeats "guided setup" in prose about the flow, which is still correct; not touched.
Collaborator

DONE — Refs #45

Commit: 0b2aa37 dashboard: single "New source" add action on /alerts/sources (branch issue/45-guided-setup-new-source, nothing pushed).

What changed: /alerts/sources header now has ONE add action — the guided-setup PageAction retitled, 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 unused bookOpenIcon import removed. The guided-setup page itself is unchanged.

Also updated: page-help.ts copy, UC-FE-51 + UC-FE-71 text and version, and the UC-FE-71 test (now asserts href="/alerts/sources/new" + label="New source", and no label="Guided setup").

Gates, all exit 0:

  • python3 docs/use-cases/_check.py — 357 UCs conform
  • python3 scripts/check-ai-headers.py — 572 ok
  • python3 scripts/check-type-mirror.py — clean
  • cd dashboard && bun run test — 251 passed / 16 files
  • cd dashboard && bun run check — 0 errors
  • cd dashboard && bun run build — adapter-node build ok
  • rg -n "Showing lines" — hits only in pre-existing markdown quoting the rule; none in code

Smoke: rendered /alerts/sources on the worktree dev server (HTTP 200) — exactly one header action, New source → /alerts/sources/new, zero Guided 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.

DONE — Refs #45 Commit: `0b2aa37` dashboard: single "New source" add action on /alerts/sources (branch `issue/45-guided-setup-new-source`, nothing pushed). What changed: `/alerts/sources` header now has ONE add action — the guided-setup `PageAction` retitled, `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 unused `bookOpenIcon` import removed. The guided-setup page itself is unchanged. Also updated: `page-help.ts` copy, UC-FE-51 + UC-FE-71 text and version, and the UC-FE-71 test (now asserts `href="/alerts/sources/new"` + `label="New source"`, and no `label="Guided setup"`). Gates, all exit 0: - `python3 docs/use-cases/_check.py` — 357 UCs conform - `python3 scripts/check-ai-headers.py` — 572 ok - `python3 scripts/check-type-mirror.py` — clean - `cd dashboard && bun run test` — 251 passed / 16 files - `cd dashboard && bun run check` — 0 errors - `cd dashboard && bun run build` — adapter-node build ok - `rg -n "Showing lines"` — hits only in pre-existing markdown quoting the rule; none in code Smoke: rendered `/alerts/sources` on the worktree dev server (HTTP 200) — exactly one header action, `New source` → `/alerts/sources/new`, zero `Guided 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.
Collaborator

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 23f9728 adds 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.

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 23f9728 adds 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.
Collaborator

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

DONE — pushed. PR: https://git.eduard3v.com/EduarD3V/gotoi/pulls/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
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
EduarD3V/gotoi#45
No description provided.