Skip to content

Custom block icons; drop the implicit "primary goal" #40

Description

@ApocDev

A block's icon is currently tied to its first goal: goals[0] anchors the block's icon/name, and the iconKind/iconName columns default to that first product. That couples a block's identity to goal order and means a multi-goal block can't be given a recognizable icon of its own.

Let the user set a custom icon for a block — pick any item, fluid, or recipe as the block's icon, independent of its goals — exposed in the block editor (the GOAL section or the block header). Default to the first goal's icon when nothing is set, so existing blocks and freshly-created ones look exactly as they do today, but allow overriding it to anything.

With that in place the implicit "primary goal" notion goes away from the user's mental model: the first goal is just the default icon source, not a special designation. Goals are simply a set of solver targets, and a block's identity comes from its name plus its chosen icon.

Notes:

  • The schema already has the iconKind/iconName columns (db/schema.ts), currently auto-set to the first product. This is mostly about exposing a picker that writes an explicit choice and falling back to the first-goal default when unset.
  • The icon picker can reuse the existing item/fluid/recipe icon search used elsewhere in the app.
  • Leave the solver-level "primary" output role (server/factory-solve.ts, used for factory productive-vs-sink scaling) alone — that's a flow classification, not the user-facing goal designation, and isn't what this changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: webWeb UI (React/TanStack/vite-plus)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions