Skip to content

C-195: feat(web): Add project dialog — machine, path, inspection result, create config, GitHub link - #404

Merged
AndreyBegma merged 6 commits into
developfrom
card/c195-feat-web-add-project-dialog-machine-path
Oct 27, 2026
Merged

AndreyBegma merged 6 commits into
developfrom
card/c195-feat-web-add-project-dialog-machine-path

Conversation

@AndreyBegma

@AndreyBegma AndreyBegma commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

What changed and why

  • web / lib — add-project.ts holds the dialog's rules as plain functions and a reducer: which machines can be chosen (online and announcing projects), the preselected machine (the one of the latest run), the platform-style path placeholder, what an inspection means, folder error messages, GitHub URL and name checks, and a 600 ms debounced inspector. Every machine or path change takes a new sequence number and the reducer drops answers for any other, so a stale inspection is never shown. add-project.test.mjs covers it (17 tests).
  • web / api client — inspectFolder, initFolder, registerFolder for the /projects/folders/* endpoints of feat(api): add a project from the website — machine, local path, GitHub link #378; Runner.features, Project.githubUrl; failures keep the API code and projectId. createProject is gone.
  • web / projects page — one Add project dialog replaces the name-only create form and the inline bind form: machine select (offline disabled, outdated with an update-CLI hint), path, live inspection (folder, scenario count, first 5 names, GitHub link), Create config when missing, refusal on an invalid config, the demoflow runner allow <dir> hint plus docs link when the path is not allowed, and "Open the existing project" on 409 project-exists. Add registers with name and GitHub URL and opens the project. Focus starts on the machine field, Enter runs the primary action, Escape closes, and an aria-live region reads the state. Project rows show a GitHub link (target="_blank" rel="noopener noreferrer").
  • i18n — projects.add.* and projects.item.github added; projects.create / projects.bind removed.
  • demo — demoflow/cards/C-195-…demo.json: signs in off camera, opens the dialog, closes it with Escape.

Acceptance criteria

  • Found → Add creates the project and opens its page — implemented (register() → registerFolder → router.push); reducer path covered by unit tests. Not exercised end to end: no paired machine in this environment.
  • No config → Create config → found — implemented; reducer test "a folder without config offers Create config, then is found".
  • path-not-allowed → hint, no Add — implemented; reducer test "a refused folder fails with the allow-roots message and no Add".
  • Offline machines disabled; outdated show the hint — machineChoice test plus the disabled options in machine-field.tsx.
  • Debounce and stale results covered by a unit test — "a stale answer is never shown", "an older change does not undo a newer one", "typing quickly sends one inspection per pause".
  • An existing folder offers to open its project — reducer test "a folder that is already a project offers to open it"; the banner links to it.
  • GitHub link on rows — project-list.tsx, checked by reading the code and the build.
  • No create or bind forms remain — CreateForm/BindForm and their i18n keys removed; tsc and build clean.
  • Demo video recorded — the scenario validates, but the run failed at readiness with missing-env DEMO_LOGIN_EMAIL: the demo credentials are not set in this environment.

Checks: bunx tsc --noEmit (web), bun run check (Biome, 644 files), bun run test in web (109/109), bun run build in web.

Nautelle-Card: C-195

…-add-project-dialog-machine-path

# Conflicts:
#	apps/api/src/projects/projects.service.ts
#	apps/api/src/runner/runner-connections.service.ts
#	apps/api/src/runner/runner-socket.ts
…fig, GitHub link (#379)

Replace the name-only create form and the inline bind form on the projects
page with one Add project dialog. It picks a ready machine, inspects the typed
folder after a 600 ms pause (stale answers dropped by sequence number), offers
Create config for a folder without one, explains a refused folder with the
allow command, and registers the project with an optional GitHub link.
Rows link to the project's GitHub repository in a new tab.
Signs in off camera, opens the Add project dialog from the Projects page and closes it with Escape. It touches only what renders on an empty account. Refs #379.
@AndreyBegma
AndreyBegma marked this pull request as ready for review October 26, 2026 18:28
@AndreyBegma
AndreyBegma changed the base branch from card/c196-feat-api-add-a-project-from-the-website to develop October 27, 2026 08:14
@AndreyBegma
AndreyBegma merged commit be1df33 into develop Oct 27, 2026
1 check passed
@AndreyBegma
AndreyBegma deleted the card/c195-feat-web-add-project-dialog-machine-path branch October 27, 2026 10:05
@AndreyBegma
AndreyBegma restored the card/c195-feat-web-add-project-dialog-machine-path branch October 27, 2026 10:17
@AndreyBegma
AndreyBegma deleted the card/c195-feat-web-add-project-dialog-machine-path branch October 27, 2026 10:54
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