Skip to content

Refactor help screen and tips to use domain.Actions as source of truth #140

@dnlopes

Description

@dnlopes

Context

The command palette feature (#TBD) introduces domain.Actions as the canonical source of truth for what actions exist in the system. However, other components still read from different sources:

Component Currently reads from
Help screen KeyMapKeyDefinitions
Tips KeyDefinitions.TipFormat
Command palette domain.Actions (new)

This creates inconsistency and potential for drift.

Proposed Change

Refactor the system so that:

  1. domain.Actions is the canonical action catalog (Name, Description, RequiresSession)
  2. KeyDefinitions references action names and adds shortcut-specific info (Defaults, TipFormat)
  3. Help screen and tips derive their content by linking these two sources

Benefits

  • Single source of truth for action metadata
  • Consistent descriptions across all UI surfaces
  • Easier to add new actions (define once in domain, wire up shortcuts in UI)

Files to Modify

  • internal/ui/help_screen.go - Read from domain.Actions + KeyDefinitions
  • internal/ui/keys_types.go - Tips should link to domain.Actions
  • Potentially consolidate action-related code

Related

  • Command palette design: docs/plans/2025-01-29-command-palette-design.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions