Skip to content

Replace LineParts.category reference field with owned String in display.rs #68

@ooloth

Description

@ooloth

Why

A &'static str field on LineParts ties the struct to static string data, which conflicts with the invariant that struct fields hold owned types, and silently prevents constructing LineParts from any runtime-owned string.

Current state

ui/tui/src/display.rs line 41 defines pub(crate) category: &'static str inside LineParts. Any construction site must supply a string literal or a 'static reference — a runtime String cannot be used without a static lifetime.

Ideal state

  • LineParts.category is String
  • All construction sites pass .to_string() on the literal value
  • LineParts holds no reference fields and can be constructed from runtime-owned data

Starting points

  • ui/tui/src/display.rs line 41 — the field definition to change from &'static str to String
  • Search for LineParts { — all construction sites to update with .to_string()

QA plan

  1. Open ui/tui/src/display.rs — expect pub(crate) category: String with no reference type
  2. Search for LineParts { — expect every category: value to use .to_string() on the literal
  3. Run cargo check from the hub workspace root — expect no reference or lifetime errors

Done when

LineParts.category is String and cargo check passes clean.

Metadata

Metadata

Assignees

No one assigned

    Labels

    author:agentThis was authored by an agent.status:agent-workingAn agent is currently implementing this

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions