Skip to content

feat(planning): empty plan offers "start from a typical setup" built from planet insights - #546

Merged
jplacht merged 1 commit into
mainfrom
feat/plan-starter-setup
Oct 1, 2026
Merged

jplacht merged 1 commit into
mainfrom
feat/plan-starter-setup

Conversation

@jplacht

@jplacht jplacht commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

What and why

A new plan opens with an empty production table, and new players don't know what a base on that planet usually looks like. Planets with enough insights data (aggregate v2, insights-01a/01b) now offer one click to fill in the typical buildings, recipe mixes and experts. It is an ordinary unsaved edit that one undo takes back.

Changes

  • New PlanStarterSetup card in the empty production table. It lists up to 8 of the most planned buildings, those in ≥ 20 % of plans pre-checked, with the median amount, typical recipes and the experts split. "Start empty" hides it and leaves a link back.
  • Apply is one undo step: handleApplyStarterSetup, plus hab auto-optimise turned on and run inside record. An Undo toast follows. The card follows the Plan suggestions setting and is not shown for shared or read-only plans.
  • planInsights.util: segmentColor (now shared with the insights box), the starter constants, and starterExperts, kept within the expert limits.
  • Tracking: plan:starter_show, plan:starter_apply, plan:starter_dismiss, documented in docs/analytics.md.
  • Tests: the handler, the one-step undo, a characterization snapshot, the util and the components. mountComponent accepts en_US messages so <i18n-t> slots render in tests.

How it was verified

  • QA: PASS, after 1 scoped fix round. All 7 acceptance criteria pass in code review (qa) and in the running app (qa-e2e, e2e stack).
  • pnpm test && pnpm tsc && pnpm lint && pnpm knip: all pass (3684 tests).
  • UI audit, plan-new: smallTargets was 1 at baseline, went to 2 in round 1 (the inline footer link), and is back to 1 after the fix. No regressions versus baseline on plan, plan-new or profile.

Screenshots

OT-580b's insights data in the card shots is synthetic (a seeded test row). The toast and below-threshold shots were taken in QA round 1; those screens didn't change in round 2.

Desktop (1440)

Starter card After apply (Undo toast)
Starter card with 8 buildings, experts split and footer Plan after applying the typical setup, with the Undo toast
After "Start empty" Planet below threshold
Empty row with the link back to the typical setup Normal empty production table

Mobile (375)

Starter card After apply (Undo toast)
Starter card stacked on mobile Plan after applying, mobile
After "Start empty" Planet below threshold
Empty row with link, mobile Normal empty table, mobile

Spec: specs/2026-10-01-insights-02-starter-setup.md (workspace repo)

🤖 Generated with Claude Code

…from planet insights

- New PlanStarterSetup card in the empty production table: up to 8 most
  planned buildings (>= 20 % preselected) with median amount, typical
  recipes and the experts split; "Start empty" hides it with a link back
- Apply is one undo step (handleApplyStarterSetup + hab auto-optimise via
  record), with an Undo toast; follows the Plan suggestions setting, not
  shown for shared or read-only plans
- planInsights.util: shared segmentColor, starter constants, starterExperts
  within the expert limits
- Tracking: plan:starter_show, plan:starter_apply, plan:starter_dismiss
- Tests: handler, one-step undo, characterization snapshot, util,
  components; mountComponent accepts en_US messages for i18n-t slots

Spec: specs/2026-10-01-insights-02-starter-setup.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for prunplanner-preview ready!

Name Link
🔨 Latest commit e558759
🔍 Latest deploy log https://app.netlify.com/projects/prunplanner-preview/deploys/6abea09897087d0008f3d6eb
😎 Deploy Preview https://deploy-preview-546--prunplanner-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

jplacht added a commit that referenced this pull request Oct 1, 2026
@codacy-production

codacy-production Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 61 complexity · 0 duplication

Metric Results
Complexity 61
Duplication 0

View in Codacy

🟢 Coverage 100.00% diff coverage · +0.02% coverage variation

Metric Results
Coverage variation ✅ +0.02% coverage variation (-1.00%)
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (5997e42) 3662 3572 97.54%
Head commit (e558759) 3688 (+26) 3598 (+26) 97.56% (+0.02%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#546) 26 26 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@jplacht
jplacht merged commit bced8d6 into main Oct 1, 2026
11 checks passed
@jplacht
jplacht deleted the feat/plan-starter-setup branch October 1, 2026 18:22
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