Repository navigation
feat(planning): empty plan offers "start from a typical setup" built from planet insights - #546
Merged
Merged
Conversation
…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>
✅ Deploy Preview for prunplanner-preview ready!
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
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 61 |
| Duplication | 0 |
🟢 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 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
PlanStarterSetupcard 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.handleApplyStarterSetup, plus hab auto-optimise turned on and run insiderecord. 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, andstarterExperts, kept within the expert limits.plan:starter_show,plan:starter_apply,plan:starter_dismiss, documented indocs/analytics.md.mountComponentaccepts en_US messages so<i18n-t>slots render in tests.How it was verified
qa) and in the running app (qa-e2e, e2e stack).pnpm test && pnpm tsc && pnpm lint && pnpm knip: all pass (3684 tests).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)
Mobile (375)
Spec:
specs/2026-10-01-insights-02-starter-setup.md(workspace repo)🤖 Generated with Claude Code