Skip to content

[E0] Editor chord-model foundation: preserve authored template metadata across save #3

Description

@byrongamatos

Status: implemented — in review (PR incoming). Foundation for got-feedBack/feedBack#334.

Problem

The editor flattens chords→notes for editing; reconstructChords() rebuilds chord_templates from scratch at save with blank name/fingers (screen.js). Authored chord names + fingerings are destroyed on edit→save. Verified: GP5 imports carry chord names (lib/gp2rs.py) and the editor wipes them.

Fix

Snapshot the authored templates (still on arr.chord_templates at reconstruct time) and carry name + per-string fingers forward by fret-pattern match — the key the editor dedup and both GP converters already use. Width-normalized to L (7/8-string). No-metadata packs save byte-identical. Pure helpers (@pure:chord-relink) + zero-drift node unit test.

Notes

  • Editor-only; routes.py already persists name/fingers.
  • displayName/template-arp deferred to E1 (backend writer drops them today).
  • Same-fret chords collapse to one template (first-wins) — pre-existing flattened-model limit, strictly better than prior blank.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions