Skip to content

feat: codeplug-project metadata (description, notes) and edit screen #60

Description

@pskillen

Problem

CodeplugProject today only stores id, name, createdAt, updatedAt, and the nested codeplug. Operators have no place to record why a codeplug exists — e.g. "Home DMR + 2 m", "Aberdeen trip May 2026", "Contest backup" — or free-form notes about layout intent, pending changes, or radio targets.

The Summary page (/summary) shows entity counts and import metadata from codeplug.meta, but nothing about the project wrapper itself. Rename/edit of project identity is deferred to #31.

Intended outcome

Extend the codeplug-project data model with operator-facing metadata and surface it on Summary with a dedicated edit screen.

Data model

Add fields to CodeplugProject in src/models/codeplugProject.ts (exact names to confirm during implementation):

Field Type Purpose
description string Short one-line summary (shown on Summary header and optionally Home project list)
notes string Longer free-form notes (markdown plain-text for v1; no renderer required initially)

Optional v1 extras if low cost: tags: string[] — defer unless needed.

Keep metadata on the project wrapper, not Codeplug.meta (which stays import/provenance: importedAt, sourceFiles).

Store

  • Add updateProject(id, patch) (or updateActiveProject) to codeplugStore — patch name, description, notes; touch updatedAt.
  • Expose via useProjects().

Summary page (/summary)

  • Show project name as page context (not just "Summary").
  • Display description prominently when set.
  • Display notes in a readable block (preserve line breaks; white-space: pre-wrap).
  • Show createdAt / updatedAt as secondary metadata.
  • Edit button → project edit screen.

Project edit screen

  • New route, e.g. /summary/edit or /project/edit.
  • Form fields: name, description, notes (and any other metadata fields added).
  • Save updates active project via store; navigate back to Summary.
  • Validation: name required (non-empty trim); reasonable max lengths documented.

Home / project list (optional v1)

  • Show description under project name on Home if set — nice-to-have, can follow in same PR or defer.

Affected

  • src/models/codeplugProject.ts
  • src/state/codeplugStorage.ts — migration
  • src/state/codeplugStore.tsxupdateProject action
  • src/routes/Summary.tsx — display metadata
  • New src/routes/project/edit.tsx (or similar)
  • src/App.tsx — route + nav if needed
  • docs/features/codeplug-project/

Notes / dependencies

Out of scope

  • Markdown rendering for notes (plain text display is fine for v1).
  • Cloud sync or exporting project metadata separately from codeplug YAML (feat: native YAML import and export #10).
  • Editing codeplug contents (channels/zones) — separate CRUD tickets.

Workflow note

Branch from origin/main, atomic conventional commits (model + migration → store → Summary display → edit route → docs), PR linking Closes #.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions