Settings: address sub-tab review feedback

Merged
TP
21d ago
+113-12

Follow-up to #37 addressing the 4 cubic P2s:

  1. Drafts cleared on success — create/promote/commit/new-branch now consume their ghDraft fields.
  2. Model setup (API key + gateway) renders before the status-gated early return, so BYOK users are unaffected by status loading/failure (restores pre-split behavior).
  3. Delete-branch enablement recomputes in the input handler via syncDelBtn.
  4. Branch drafts scoped to the repo — ghResetBranches clears picker/delete drafts (called on open/create/promote/logout); switch/new track the picked branch; delete clears the deleted name.

Test: extended branches.test.ts served-page needles covering each fix.


Summary by cubic

Settings now keep model setup available while GitHub status loads or fails, and clear completed action drafts without losing text typed mid-flight.

  • Drafts clear only when they still match what was submitted, so input typed during an in-flight action survives.
  • Branch drafts reset only on a repo change; same-repo History loads keep the picker input, and logout clears them.
  • Switch, new, and delete sync the picker to the refreshed branch state (including error paths), and the Delete button enables while typing.
  • Adds served-page checks covering these behaviors.