Pins blueprints as production lines and adds the Production Lines home widget #83
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/widget-industry-line"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pins: schema step 118 adds one table, blueprint_pins (user_id, blueprint_type_id, pinned_at), keyed per account. The Blueprints page (/industry/) gains a Pin toggle on every blueprint row: a quiet Pin button, or Pinned in gold when the blueprint is pinned. It posts to /industry/pin/ in the same form pattern as the briefing dismissal (204 for scripted callers, redirect back to the same character library for browsers). sqlc queries: PinBlueprint, UnpinBlueprint, ListBlueprintPins.
Widget: Production Lines (id prodline) joins the home catalog next to Industry, default size 2x2, not in the default layout. It shows only pinned lines, judged from the per-character industry job snapshots the home bundle already loads. A line is due when one of its jobs is ready, or a manufacturing or reaction job on it finishes within a day; it needs a restart when no job on it is running; otherwise it shows the product name and the word healthy. The buy list is one run of materials for each due or idle line, from the stored SDE recipes (sde_blueprint_materials), less the quantities the stored asset snapshots hold across the account, summed the same way the build planner sums stock. Where no asset snapshot covers a material, the full need is listed.
Detail follows the widget stored size: area under 4 cells shows the due and needs-restart lines only (or a note that all pinned lines are running); the default 2x2 adds the healthy lines and the buy list; area 6 and up adds which character runs each line and when it ends, plus each due or idle line own missing materials. No changes to the size system, picker, layout format, or any existing widget; CSS is scoped to the new widget card and the toggle button.
Tests, all as pgtester: TestBlueprintPinRoundTrip posts through the surface handler and re-reads the page; TestProdLineWidgetSizes covers a ready line (due), a line finishing in two hours (due), a running line (healthy), an idle line (needs a restart), an unpinned blueprint left out, exact buy-list quantities at all three size bands, and the runner detail appearing only at the largest size; TestProdLineWidgetNoPins covers the empty state. The three new tests plus 55 existing industry, home, widget, module, demo and planner tests pass; the full internal/store suite passes (migration 118 applies cleanly); and the full internal/app suite passes (873s, after a first attempt hit the local harness default 10 minute test timeout with no FAIL lines recorded).
cef1387a05b9f3abc304b9f3abc3044e8c876891