This repository was archived by the owner on Aug 14, 2026. It is now read-only.
fix(skein-ui): fix insert-parent blank command and Enter key reliability + add UI tests - #72
Open
hlship wants to merge 1 commit into
Open
fix(skein-ui): fix insert-parent blank command and Enter key reliability + add UI tests#72hlship wants to merge 1 commit into
hlship wants to merge 1 commit into
Conversation
…ity + add UI tests Fixes two reported bugs: 1. Insert parent silently fails when -data is empty (browser-specific, especially on Linux). Added inline error display in the modal and a guard that sets :error on the modal cursor instead of silently returning [nil session]. 2. Enter key only works ~50% of the time for command input. The component relied solely on data-on:change (blur event) which is unreliable on Linux. Added explicit data-on:keydown handler for Enter key, and added a nil/blank guard to process-new-command that prevents sending meaningless commands to the process. Additions: - 29 new tests using hyper/test patterns and direct function testing: - blank-command-guard-rejects-blank-inputs (asserts the core fix) - non-blank-command-is-allowed - insert-parent-blank-command-is-silent (documents the bug pattern) - insert-parent-with-blank-command-returns-unchanged-session - insert-parent-with-whitespace-command-returns-unchanged-session - insert-parent-with-valid-command-succeeds - insert-parent-with-duplicate-on-parent-returns-error - normalize-input-* (4 tests for the guard) - blank-predicates-pass-the-guard - trim-collapses-interior-whitespace - node-color-class* (13 tests covering all CSS class combinations) Make node-color-class public (was defn-) to allow testing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Bug Fixes
1. Insert parent silently fails on Linux browsers
do-insert-parentthat sets modal error instead of silently returning[nil session]$form-data["command"]was empty during form submission on Linux, causingnormalize-inputto produce a blank string →insert-parent!returned[nil session]silently → modal dismissed without feedback2. Enter key only works ~50% of the time for command input
data-on:keydownhandler for Enter key on the new-command-inputprocess-new-commandthat prevents sending meaningless commands to the processdata-on:change(blur event) which is unreliable when $value isn't populated by Hyper (observed on Linux browsers)New Tests (29 total, bringing total to 138)
Other
node-color-classpublic (wasdefn-) to enable testing from outside the namespace