Problem
Import is currently the only way to create a new codeplug project. Operators who want to design a layout from scratch — the equivalent of File → New — have no entry point on the landing page.
The README and AGENTS.md already describe "import or start a blank project" as a core workflow, but Home (/) only offers Import codeplug and opening existing projects. newProject() and emptyCodeplug() already exist in the model layer; the gap is store action + UI.
Deferred from #31 (closed); still tracked in codeplug-project-outstanding.md.
Intended outcome
Add a Start fresh (or similar) control on Home that:
- Creates a new
CodeplugProject with an empty codeplug (emptyCodeplug()).
- Sets it as the active project and persists to localStorage.
- Navigates the operator to the existing project metadata edit screen at
/summary/edit (today titled Edit project — name, description, author, target radios, notes; shipped in #60).
After save, behaviour matches import: return to Summary (/summary) with an empty codeplug ready for CRUD.
Home (/)
- Prominent button alongside import — e.g. Start fresh or New codeplug (copy TBD; avoid "project" in user-facing label where possible per codeplug-project docs).
- Update intro copy: today it implies OpenGD77 import is the only path (
"Import an OpenGD77 CPS export to get started"); mention both import and start-fresh.
- When projects already exist: same button under a section heading (mirror "Import another codeplug").
Default name
- Seed a placeholder project name on create (e.g.
"Untitled codeplug" or "New codeplug") — operator renames on the edit screen.
- Confirm no collision with existing project names if uniqueness is enforced later; v1 can allow duplicates like import does today.
Edit screen (/summary/edit)
- Reuse existing
ProjectEdit form — no new route required for v1.
- Optional polish (same PR or follow-up): when arriving from start-fresh, Back / Cancel could go to Summary rather than assuming prior context; focus name field on mount.
Store
Add e.g. createBlankProject(name?: string) to useProjects():
newProject(name ?? defaultBlankName) → append to projects, set activeProjectId, persist.
- Mirror
importNewProject side effects (clear persistence error, dispatch reducer action).
No import result or Codeplug.meta provenance fields required for a blank create.
Affected
src/state/codeplugStore.tsx — new action + reducer case
src/routes/Home.tsx — button + copy
src/models/codeplugProject.ts — optional DEFAULT_BLANK_PROJECT_NAME constant
src/routes/project/edit.tsx — optional start-fresh UX polish
- Tests: store action, Home button navigates to edit, persistence round-trip
docs/features/codeplug-project/ — mark "New empty project" shipped in README + outstanding
Notes / dependencies
Out of scope
- Duplicate project.
- Native YAML save/load (#10).
- Wizard / multi-step onboarding beyond the existing edit form.
- Confirm dialog when starting fresh would discard unsaved work on another tab (no multi-tab sync today).
Manual verify
- Home with no projects → Start fresh → lands on Edit project with placeholder name → save → Summary shows 0 channels/zones.
- Home with existing projects → Start fresh → new row on Home after returning; active project switches.
- Hard refresh → blank project + metadata persist.
- Import path unchanged.
Workflow note
Branch from origin/main, atomic conventional commits (store action → Home UI → tests → docs), PR linking Closes #<n>.
Problem
Import is currently the only way to create a new codeplug project. Operators who want to design a layout from scratch — the equivalent of File → New — have no entry point on the landing page.
The README and
AGENTS.mdalready describe "import or start a blank project" as a core workflow, but Home (/) only offers Import codeplug and opening existing projects.newProject()andemptyCodeplug()already exist in the model layer; the gap is store action + UI.Deferred from #31 (closed); still tracked in
codeplug-project-outstanding.md.Intended outcome
Add a Start fresh (or similar) control on Home that:
CodeplugProjectwith an emptycodeplug(emptyCodeplug())./summary/edit(today titled Edit project — name, description, author, target radios, notes; shipped in #60).After save, behaviour matches import: return to Summary (
/summary) with an empty codeplug ready for CRUD.Home (
/)"Import an OpenGD77 CPS export to get started"); mention both import and start-fresh.Default name
"Untitled codeplug"or"New codeplug") — operator renames on the edit screen.Edit screen (
/summary/edit)ProjectEditform — no new route required for v1.Store
Add e.g.
createBlankProject(name?: string)touseProjects():newProject(name ?? defaultBlankName)→ append toprojects, setactiveProjectId, persist.importNewProjectside effects (clear persistence error, dispatch reducer action).No import result or
Codeplug.metaprovenance fields required for a blank create.Affected
src/state/codeplugStore.tsx— new action + reducer casesrc/routes/Home.tsx— button + copysrc/models/codeplugProject.ts— optionalDEFAULT_BLANK_PROJECT_NAMEconstantsrc/routes/project/edit.tsx— optional start-fresh UX polishdocs/features/codeplug-project/— mark "New empty project" shipped in README + outstandingNotes / dependencies
/summary/editalready requires an active project viaRequireActiveProject; creating + activating before navigate satisfies this.Out of scope
Manual verify
Workflow note
Branch from
origin/main, atomic conventional commits (store action → Home UI → tests → docs), PR linkingCloses #<n>.