Skip to content

feat(onboarding): Getting started page and product tour (#51) - #879

Merged
artempartos merged 10 commits into
developfrom
feature/51-product-tour
Dec 2, 2026
Merged

artempartos merged 10 commits into
developfrom
feature/51-product-tour

Conversation

@aixle-com

@aixle-com aixle-com Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

What and why

New members used to land on an empty project list after onboarding. With the product_tour flag on, they now land on Getting started and can take a click-through product tour that installs the Hello Flow starter template and runs it. This implements the Tech Design on card #51.

  • Backend:
    • New columns product_tour_a_finished_at and product_tour_b_finished_at on company_memberships. A data migration marks every member who already finished onboarding as having finished both tours, so turning the flag on redirects no existing user.
    • New CompanyMembership#getting_started_pending?.
    • AuthConcern#app_home_path returns Getting started while that is pending and the flag is on. It is the one place every landing goes through.
    • New controllers: GettingStartedController (show, and build_with_ai, which opens AI Builder in the member's newest project or creates "New Project" first) and ProductToursController#update (records a finish or skip).
    • workflow_runs#status returns JSON for the tour's "first run finished" toast.
    • New shared prop currentUser.productTour.
  • Engine: shared/lib/productTour/, mounted once around the Inertia app.
    • Driver.js (MIT, ^1.10.2) draws one step at a time behind a two-method interface. Our provider owns the step order, page changes and progress (kept in sessionStorage).
    • Steps find their targets through data-tour attributes added to existing pages. These are attribute-only changes; TabBar and BoardColumn each got an optional dataTour prop.
    • Tour A covers steps A1 to A15; tour B is for viewers.
  • UI:
    • New GettingStarted/GettingStartedPage: four cards for members, only the tour card for viewers.
    • Start product tour in the user menu, disabled with the reason shown under the label.
    • The sidebar expands itself and its groups when a step points into it.
  • Docs: docs/design/product-tour.md holds the library decision (Driver.js over AGPL Shepherd.js and Intro.js), the as-built step table and the deviations from the card. It is indexed in docs/index.md. Also updated: the portal Getting Started page and CHANGELOG.md.

Deviations from the card and design (also in the design doc)

  • A6, A13, A14 copy, as the Tech Design proposed:
    • A6: the template still has a trigger to switch on, so the checklist is not empty.
    • A13: the run page has an Assets tab, not a block.
    • A14: templates cannot ship a board card, so the step highlights the column with the trigger.
  • Menu item reason: a disabled Mantine menu item cannot show a tooltip, so the reason is written under the label.
  • Pending click step: the step a click leads to is also written to sessionStorage, because the template page's Install is a plain link that loads a whole page.
  • No user-guide mirror: docs/user-guide/getting-started.md does not exist, so only the portal page was updated.

Not in this PR

Hello Flow belongs in AixleHQ/flow-templates, which this session could not write to. Until the catalog has aixle/hello-flow, helloFlowAvailable is false, so tour A and its card stay hidden and only viewers get a tour.

Card: https://flow.aixle.com/company/projects/56/board?n=51

Checks

The agent container has no Docker daemon (dockerd cannot start without privileges), and CLAUDE.md forbids running Ruby or Node on the host. So no check was run locally:

  • not run: bin/rails test (new and changed: test/models/company_membership_test.rb, test/db/backfill_product_tour_finished_test.rb, test/integration/web/company/getting_started_test.rb, test/integration/web/company/projects/workflow_runs_{controller,authorization}_test.rb, test/integration/web/company/read_only_backstop_test.rb, test/policies/web/company/{getting_started,product_tours}_policy_test.rb)
  • not run: vitest (shared/lib/productTour/*.test.ts(x), pages/GettingStarted/GettingStartedPage.test.tsx, shared/ui/AppSidebar.test.tsx)
  • not run: make lint_check_all (rubocop, brakeman, eslint, tsc, steiger)

These must run in the web container before CI can pass. Each is a known CI failure until it does:

  • yarn.lock is not updated for the new driver.js dependency, so yarn install --immutable fails. Fix: docker compose exec -T web yarn install.
  • app/frontend/shared/routes.ts is not regenerated for the new routes (companyGettingStartedPath, companyGettingStartedBuildWithAiPath, companyProductTourPath, statusCompanyProjectWorkflowRunPath). Fix: docker compose exec -T -e RAILS_ENV=test web bin/rails ts:routes.
  • app/frontend/types/generated/ is not regenerated for CurrentUser.productTour and Features.productTour. Fix: docker compose exec -T web bin/rails typelizer:generate.
  • db/schema.rb was edited by hand to match the two new migrations. Confirm with bin/rails db:migrate; the schema_parity tag runs on this PR.

🤖 Generated with Claude Code

@aixle-com

aixle-com Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Code Review — round 1 — NEEDS CHANGES

Reviewed feature/51-product-tour (5 commits, 59 files) against develop, the Tech Design (card #51), CLAUDE.md and docs/testing.md. The backend, the tour engine and the tests are close to the Tech Design and well covered. One problem blocks the merge: the generated files and the lockfile were never updated, so the branch does not build.

Critical

  1. Generated files and the lockfile are missing, so the build, tsc and Vitest fail. The PR's own note says the generators never ran. CLAUDE.md ("Generated files") requires their output to be committed with the change that caused it.

    • app/frontend/shared/routes.ts was not regenerated. It has none of companyGettingStartedPath, companyGettingStartedBuildWithAiPath, companyProductTourPath or statusCompanyProjectWorkflowRunPath. They are imported at app/frontend/shared/lib/productTour/ProductTourProvider.tsx:8,12, app/frontend/pages/GettingStarted/GettingStartedPage.tsx:9 and GettingStartedPage.test.tsx:8. Every importing module and test fails to compile or resolve.
    • The Typelizer types were not regenerated. app/frontend/types/generated/ has no CurrentUser.productTour (declared at app/resources/current_user_resource.rb:104) and no Features.productTour (the product_tour flag, client: true). This breaks app/frontend/shared/ui/AppSidebar.tsx:662 (CurrentUser['productTour']), AppSidebar.tsx:794 (useFeatureFlag('productTour') is typed keyof Features) and app/frontend/test/factories/sharedProps.ts:51.
    • yarn.lock has no driver.js entry, although it is in package.json:81. The Dockerfile (lines 85, 142) runs yarn install --immutable, so the image build fails.

    Required fix: in the web container, run these and commit their output on this branch:

    • yarn install
    • docker compose exec -T -e RAILS_ENV=test web bin/rails ts:routes
    • bin/rails typelizer:generate

    Then run make lint_check_all and the touched Rails and Vitest files, and check that CI is green. Do not edit routes.ts or types/generated/ by hand.

Non-critical suggestions

  • No system test. The Tech Design asks for one tour A happy path up to A11 (with a Hello Flow catalog fixture) and one short tour B path. The behavior is covered by the request, model and Vitest tests, but a system test is the only place that would catch the Driver.js overlay over the Mantine Run drawer (A10) and the full-page Install link (A4).
  • Overlay vs. Mantine portals. productTour.module.css adjusts the notifications z-index but nothing for Drawer or Modal. The Tech Design lists this as a risk, so check by hand in both colour schemes that the A10 Run workflow button in the drawer can be clicked through the cut-out.
  • build_with_ai can pick a read-only project (app/controllers/web/company/getting_started_controller.rb:18). Project.for_user returns projects the member can see. The Tech Design says "the newest project the user can write to", so an employee with only read access to their newest project is sent to an AI Builder they cannot use. Narrow the scope to projects the member can write to.
  • Backfill condition (db/migrate/20261125100001_backfill_product_tour_finished.rb:12). It keys on onboarding_completed_at IS NOT NULL. Keying on onboarding_state = 'completed' (with COALESCE(onboarding_completed_at, NOW())) would also cover a completed membership with no timestamp, which would otherwise be redirected once the flag is on.
  • new_project_name (getting_started_controller.rb:27-30). LIKE 'New Project%' followed by create! races with a concurrent create and raises on the uniqueness validation. It is unlikely, but a rescue-and-retry (or create with an error redirect) would be safer than a 500.
  • Comment rules (CLAUDE.md). A few comments restate the code, for example config/routes/web.rb ("Getting started and the product tour"), the tourId doc on NavItem and the dataTour props docs in BoardColumn/TabBar. They could go.
  • hello_flow_available? is cached for 10 minutes for every company, so tour A appears with up to a 10-minute delay after Hello Flow is published. That is fine; it could be mentioned in docs/design/product-tour.md.

@aixle-com

aixle-com Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Code Review — round 1 — NEEDS CHANGES

Reviewed feature/51-product-tour at 378b3e41 (5 commits, 59 files) against develop, the Tech Design (card #51), CLAUDE.md and docs/testing.md. The branch has no new commits since the previous review, and the earlier fix attempt reported that it could not run the generators. The blocking issue is still there.

Critical

  1. Generated files and the lockfile are missing, so the image build, tsc and Vitest fail. CLAUDE.md ("Generated files") requires generator output to be committed with the change that caused it.

    • app/frontend/shared/routes.ts was not regenerated. It has no companyGettingStartedPath, companyGettingStartedBuildWithAiPath, companyProductTourPath or statusCompanyProjectWorkflowRunPath, but these are imported by app/frontend/shared/lib/productTour/ProductTourProvider.tsx:8-12, app/frontend/pages/GettingStarted/GettingStartedPage.tsx:9 and its test.
    • app/frontend/types/generated/ has no CurrentUser.productTour (from app/resources/current_user_resource.rb) and no Features.productTour (config/feature_flags.yml, client: true). AppSidebar.tsx (CurrentUser['productTour'], useFeatureFlag('productTour')) and test/factories/sharedProps.ts therefore fail type-checking.
    • yarn.lock has no driver.js entry, but package.json:81 adds it. The Dockerfile runs yarn install --immutable, so the image build fails.

    Required fix: on a machine with the Docker stack, on this branch, run:

    docker compose exec -T web yarn install
    docker compose exec -T -e RAILS_ENV=test web bin/rails ts:routes
    docker compose exec -T web bin/rails typelizer:generate
    docker compose exec -T web make lint_check_all
    

    Commit the output, then run the Rails and Vitest files this PR touches. Do not edit routes.ts or types/generated/ by hand.


Non-critical suggestions

  • No system test. The Tech Design asks for a tour A happy path up to A11 and a short tour B path. The request, model and Vitest tests cover the logic, but only a system test would catch the overlay covering the Mantine Run drawer (A10).
  • Overlay vs. Mantine portals. productTour.module.css adjusts the z-index for notifications but not for Drawer or Modal. Check by hand, in both colour schemes, that the A10 Run workflow button can be clicked.
  • build_with_ai may pick a read-only project (app/controllers/web/company/getting_started_controller.rb:18). Project.for_user returns every project the member can see, but the Tech Design says "the newest project the user can write to". Narrow the scope to writable projects.
  • Backfill condition (db/migrate/20261125100001_backfill_product_tour_finished.rb:12). It keys on onboarding_completed_at IS NOT NULL. A completed membership with no timestamp would be redirected once the flag is on. Keying on onboarding_state = 'completed' with COALESCE(onboarding_completed_at, NOW()) covers that case.
  • new_project_name race (getting_started_controller.rb:27-30). Two concurrent create! calls can trip the uniqueness validation and return a 500. Rescue and retry, or redirect with an error.
  • Status payload (workflow_runs_controller.rb status). It returns state where the Tech Design says status. The frontend reads state, so it works; mention the field in docs/design/product-tour.md.
  • Comment rules (CLAUDE.md). Some comments restate the code, for example config/routes/web.rb ("Getting started and the product tour") and the dataTour prop docs in BoardColumn/TabBar.
  • Catalog cache. hello_flow_available? is cached for 10 minutes, so tour A can appear up to 10 minutes after Hello Flow is published. That is fine, but worth a line in the design doc.

@aixle-com

aixle-com Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Code Review — round 1 — PASS

Reviewed feature/51-product-tour at a51dd4eb (8 commits, 66 files) against develop, the Tech Design (card #51), CLAUDE.md and docs/testing.md.

The blocking issue from the earlier reviews is fixed. cd95dc60 commits the generator output:

  • routes.ts now has companyGettingStartedPath, companyGettingStartedBuildWithAiPath, companyProductTourPath and statusCompanyProjectWorkflowRunPath.
  • The Typelizer types now have CurrentUser.productTour and Features.productTour, with new digests.
  • yarn.lock now has [email protected].

b94f6281 and a51dd4eb fix lint, type and test failures. They also reserve the getting_started and product_tour company slugs. Every CI check on the head commit passes: Lint, Rails ×3, Vitest ×3, System, Coverage and Secret Scan.

The main behavior is tested at the layers docs/testing.md asks for:

  • Model: getting_started_pending? and finish_product_tour!.
  • Backfill: a migration test.
  • Request: landing, Getting started props, build_with_ai, product_tour#update and workflow_runs#status, plus the authorization test.
  • Policy: both new policies.
  • Vitest: the tour engine, the step and anchor coverage, GettingStartedPage, and the user menu in AppSidebar.

Critical

None.


Non-critical suggestions

  • No system test. The Tech Design asks for a tour A happy path up to A11 and a short tour B path. Only a system test would catch the Driver.js overlay covering the Mantine Run drawer (A10). Until one exists, check by hand in both colour schemes that the Run workflow button in the drawer can be clicked (productTour.module.css sets a z-index for notifications only).
  • build_with_ai can open a read-only project (app/controllers/web/company/getting_started_controller.rb:18). Project.for_user returns every project the member can see. The Tech Design says "the newest project the user can write to". Narrow the scope to projects the member can write to.
  • Backfill condition (db/migrate/20261125100001_backfill_product_tour_finished.rb:12). It only marks memberships with onboarding_completed_at IS NOT NULL. A membership that completed onboarding but has no timestamp would be sent to Getting started once the flag is on. Keying on onboarding_state = 'completed' with COALESCE(onboarding_completed_at, NOW()) would cover that case.
  • new_project_name race (getting_started_controller.rb:27-30). Two concurrent create! calls can both pick the same name, and the second fails the uniqueness check and returns a 500. Rescue and retry, or redirect with an error.
  • Status payload (workflow_runs_controller.rb, status). It returns state where the Tech Design says status. The frontend reads state, so it works; note the field name in docs/design/product-tour.md.
  • Comment rules (CLAUDE.md). Some comments restate the code: config/routes/web.rb ("Getting started and the product tour") and the dataTour prop docs in BoardColumn and TabBar.
  • Catalog cache. ProductTour.hello_flow_available? is cached for 10 minutes, so tour A can appear up to 10 minutes after Hello Flow is published. That is acceptable, and worth a line in the design doc.
  • The PR is still a draft, and the Hello Flow template (aixle/hello-flow in flow-templates) has not shipped yet. Until it does, tour A stays hidden.

@dvislov
dvislov marked this pull request as ready for review December 2, 2026 09:57
@dvislov
dvislov requested a review from artempartos December 2, 2026 09:57
Aixle Flow and others added 10 commits December 2, 2026 22:01
…g started

Tour completion is stored per company membership, like onboarding, so a
viewer in one company still gets the full tour where they can run things.
Existing members are backfilled as finished. Everything sits behind the
product_tour release flag.

Refs #51

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Aixle Flow <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
Driver.js draws one step at a time; the step order, page changes and
progress belong to ProductTourProvider, mounted around the Inertia app
because only that tree outlives page visits. Steps find their targets by
data-tour attributes on existing components. The user menu gets Start
product tour while the product_tour flag is on.

Refs #51

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Aixle Flow <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
Refs #51

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Aixle Flow <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
Refs #51

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Aixle Flow <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
Refs #51

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Aixle Flow <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
…duct tour

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Dmitry Vislov <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
The Getting started cards become labelled sections so the Build with AI
button in the card can be told apart from the one in the layout banner.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Dmitry Vislov <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
… tests

getting_started and product_tour are company sections, so a company slug
must not take them. The remove-by badge test now travels past the first
release flag to expire, which is product_tour, not external_runners.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Dmitry Vislov <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
Hello Flow researches the company named by a board card and fails on a run
started by hand, so the tour now has the member switch its trigger on, add
a card named after a company and drag it into Researching, then follows
that card's run, instead of pressing Run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Dmitry Vislov <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
… of skipping

Getting started follows direction A2 (List) from task #358: one column of
illustrated cards, light and dark, with the tour, templates and Build with
AI held back until an agent is connected; Personal MCP stays open. The
sidebar's Build with AI waits for an agent too.

Skip tour sat on every step and finished the tour for good, taking Getting
started with it. Closing a step now pauses the tour; it resumes from
Getting started or the user menu, and is turned down once, on Getting
started. Progress moves to localStorage, keyed by member and company, so a
paused tour survives signing out.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Dmitry Vislov <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
@artempartos
artempartos force-pushed the feature/51-product-tour branch from 5af76f7 to 819f8f0 Compare December 2, 2026 14:03
@artempartos
artempartos merged commit f2c4a32 into develop Dec 2, 2026
18 checks passed
artempartos added a commit that referenced this pull request Dec 2, 2026
* origin/develop: (23 commits)
  ci(images): publish web, otlp-ingest and runner-relay for linux/arm64 (#983)
  fix(k8s): give a pod's image pull its own start budget (#979)
  build(dev): pull published agent images instead of building them (#980)
  fix(deps): bump coder-cli to v2.34.22 (CVE fixes) (#956)
  chore(agents): raise agent CLI pins for canary #943 (#975)
  docs(runners): record the §12.5 staging validation of the coder runner (row 18) (#978)
  build(dev): run local Temporal on the CLI dev server image (#954)
  fix(deps): websocket-driver 0.9.2 security batch, cross-spawn and tar re-resolve (#976)
  feat(web): link the docs portal from the app footer and sidebar (#379) (#969)
  feat(onboarding): Getting started page and product tour (#51) (#879)
  feat(dashboard): keep the table's sort in the URL (#974)
  fix(kiro): offer the models the account has today, not those of its last login (#973)
  feat(dashboard): keep the period and filters in the URL (#972)
  feat(company-settings): confirm worker count changes before saving (#971)
  feat(runners): the Coder runner in the UI: form, Environments section and docs (runners 17e, #315) (#963)
  docs(trackers): tech design for trackers chosen per session (#959)
  chore: remove the integrations backfill tooling left from #298 (#964)
  feat(runners): a coder runner created from the console (runners 17d, #309) (#960)
  chore(release): 1.23.0 (#961)
  feat(coder): Coder services for a second consumer, in the layers of runner-layers.md (runners 17b, #304) (#919)
  ...

# Conflicts:
#	CHANGELOG.md
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.

2 participants