Skip to content

Commit cd462e0

Browse files
committed
test(action-picker): add PBT edgecases; fix 2 bugs found by it
Property-based testing closed the one coverage gap (action-picker-helpers had no .edgecases.test.ts) and immediately surfaced two pre-existing root-cause bugs: - normalizeKeyName: plain-object lookup returned inherited Object.prototype members (e.g. 'toString' -> the function) instead of falling through. Guard with Object.hasOwn. - autoName(launch): '??' didn't catch the empty-string basename, so an empty or separator-ending target produced an empty display name. Use '||'. New: src/lib/action-picker-helpers.edgecases.test.ts (18 properties, 5-category framework; concurrency/temporal N/A for pure fns). Report in plans/edge-cases/. Gates: tsc + vitest 1068 + knip all green.
1 parent ab3454e commit cd462e0

3 files changed

Lines changed: 419 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Fixed
11+
- **Key-name normalization is robust against reserved names.** `normalizeKeyName`
12+
used a plain-object lookup, so inputs like `"toString"`/`"valueOf"` returned an
13+
inherited `Object.prototype` function instead of the string. Found by
14+
property-based testing; now guarded with an own-property check.
15+
- **Launch actions always get a non-empty default name.** A launch target that
16+
was empty or ended in a path separator (e.g. `C:\`) produced an empty
17+
auto-generated name (`??` didn't catch the empty-string basename). Found by PBT.
1118
- **Window can no longer be resized below its usable size.** The borderless
1219
window didn't get the OS minimum-size clamp, so dragging it narrow broke the
1320
layout (the sidebar piled up full-width over the workspace). The 900×600

0 commit comments

Comments
 (0)