Problem
Channel.number maps to OpenGD77 Channel Number — a vendor CPS concept (1–1023, used for direct-access in the radio's All-channels zone). It has no meaning in our vendor-neutral internal model: channels are identified by stable internal id and referenced by name at export boundaries.
Storing number in the model leaks OpenGD77 semantics into CRUD UI and persistence, and will not generalise to other radios (DM32 uses No. with different rules).
Intended outcome
Remove number from the internal Channel model and apply channel numbering only at export time per target vendor.
Data model
- Drop
number from Channel in src/models/codeplug.ts.
- Bump
CODEPLUG_SCHEMA_VERSION; migrate loaded projects (discard imported number values — they can be re-derived on next export).
- Update
docs/features/data-model/README.md.
Import
- OpenGD77: stop mapping
Channel Number → Channel.number. Optionally ignore on import or stash in vendorExtras temporarily during transition (prefer discard once export assigns fresh numbers).
- Update
docs/features/import/opengd77.md mapping table.
Export
- OpenGD77: assign
Channel Number when serialising Channels.csv — e.g. sequential 1…n in export row order, or preserve stable ordering by channel list position. Document the assignment rule.
- Respect OpenGD77 constraints (1–1023, unique). Surface export warning if channel count exceeds limit.
- Update export docs.
UI
Remove channel number from:
- Channel edit (
src/routes/channels/edit.tsx — Channel number TextInput in Identity section)
- Channel detail (
src/routes/channels/detail.tsx — Identity field)
- Channel list (not currently shown; verify no column/filter references)
Affected
src/models/codeplug.ts + schema migration
src/lib/import/opengd77/parse.ts, columns.ts
src/lib/export/opengd77/serialise.ts
src/routes/channels/edit.tsx, detail.tsx
- Tests and fixtures referencing
channel.number
docs/features/data-model/, import/export docs
Notes / dependencies
- OpenGD77 skill: channel number is "Unique; direct-access in All-channels zone" — export assignment must produce valid unique integers.
- Independent of the broader field-type refactor issue — can land first as a focused change.
- Round-trip import → edit → export will not preserve original channel numbers (acceptable; numbers are a radio indexing aid, not operator identity).
Out of scope
- Letting operators pin a preferred channel number in the UI (future vendor-specific export option if needed).
- DM32
No. column rules (defer until DM32 export ships).
Workflow note
Branch from origin/main, atomic conventional commits, PR linking Closes #.
Problem
Channel.numbermaps to OpenGD77Channel Number— a vendor CPS concept (1–1023, used for direct-access in the radio's All-channels zone). It has no meaning in our vendor-neutral internal model: channels are identified by stable internalidand referenced bynameat export boundaries.Storing
numberin the model leaks OpenGD77 semantics into CRUD UI and persistence, and will not generalise to other radios (DM32 usesNo.with different rules).Intended outcome
Remove
numberfrom the internalChannelmodel and apply channel numbering only at export time per target vendor.Data model
numberfromChannelinsrc/models/codeplug.ts.CODEPLUG_SCHEMA_VERSION; migrate loaded projects (discard importednumbervalues — they can be re-derived on next export).docs/features/data-model/README.md.Import
Channel Number→Channel.number. Optionally ignore on import or stash invendorExtrastemporarily during transition (prefer discard once export assigns fresh numbers).docs/features/import/opengd77.mdmapping table.Export
Channel Numberwhen serialisingChannels.csv— e.g. sequential 1…n in export row order, or preserve stable ordering by channel list position. Document the assignment rule.UI
Remove channel number from:
src/routes/channels/edit.tsx—Channel numberTextInputin Identity section)src/routes/channels/detail.tsx— Identity field)Affected
src/models/codeplug.ts+ schema migrationsrc/lib/import/opengd77/parse.ts,columns.tssrc/lib/export/opengd77/serialise.tssrc/routes/channels/edit.tsx,detail.tsxchannel.numberdocs/features/data-model/, import/export docsNotes / dependencies
Out of scope
No.column rules (defer until DM32 export ships).Workflow note
Branch from
origin/main, atomic conventional commits, PR linkingCloses #.