fix: block duplicate env/header keys at entry instead of silently dropping one (#38) #49

Merged
the_og merged 1 commits from fix/38-duplicate-kv-keys into main 2026-07-12 13:06:55 -04:00
Owner

Closes #38.

KeyValueTable.dump() builds a dict, so two rows with the same key silently lost one value on save. Duplicates are now blocked at the only writer:

  • Add dialog: OK disabled + inline "'KEY' already exists" warning while the typed key duplicates an existing row.
  • Inline edits: a column-0 edit that collides is reverted to its previous text (tracked via UserRole) with a tooltip "Duplicate key 'X' — reverted."
  • dump() unchanged.

Verified with an offscreen widget smoke test: renaming a key into a collision reverts with no data loss; legitimate renames pass. Tests + ruff clean. (Implemented by a delegated agent; reviewed.)

🤖 Generated with Claude Code

Closes #38. `KeyValueTable.dump()` builds a dict, so two rows with the same key silently lost one value on save. Duplicates are now blocked at the only writer: - **Add dialog**: OK disabled + inline "'KEY' already exists" warning while the typed key duplicates an existing row. - **Inline edits**: a column-0 edit that collides is reverted to its previous text (tracked via UserRole) with a tooltip "Duplicate key 'X' — reverted." - `dump()` unchanged. Verified with an offscreen widget smoke test: renaming a key into a collision reverts with no data loss; legitimate renames pass. Tests + ruff clean. (Implemented by a delegated agent; reviewed.) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
the_og added 1 commit 2026-07-12 13:05:58 -04:00
fix: block duplicate env/header keys at entry instead of silently dropping one (#38)
CI / Lint (ruff) (pull_request) Successful in 7s
CI / Tests (py3.10) (pull_request) Successful in 9s
CI / Tests (py3.12) (pull_request) Successful in 9s
42456f25d2
Closes #38

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
the_og merged commit 41891ddad4 into main 2026-07-12 13:06:55 -04:00
the_og deleted branch fix/38-duplicate-kv-keys 2026-07-12 13:06:55 -04:00
Sign in to join this conversation.