Repository navigation
fix(wheel): re-render mirror after pin order commit - #16
Merged
Merged
Conversation
pinOrder() treated inject_order <= 0 as "unordered" (sentinel 9999), so a committed write of position 0 — a 0-based writer or a pack-authored weight of "0" (inject_order is user-facing pack data per GUI_RENOVATION_GUIDE) — silently sorted to the tail. The commit chain itself was sound: set_pin_order persists, wheelSort flips to manual, and loadPrompts+rebuildIndex+renderPrompts re-renders #wheelMirror — but the fresh sort mapped the new first item to the tail, so the DOM appeared to never update. Any finite inject_order is an explicit position now. Strengthen wheel_sort_drag_e2e so this class of bug cannot pass again: mock backend is durable (localStorage-backed, 1-based writes matching Rust), post-drop asserts submitted ids == rendered DOM order for pointer and keyboard commits, a rejected commit must roll back the visual order with no mid-state residue, the committed order must survive page.reload(), and inject_order "0" must rank first not last. Verified: reverting the refresh chain FAILs the new DOM-order checks; reverting pinOrder FAILs the "0" check. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Haaaiawd
force-pushed
the
fix/wheel-drag-commit-no-refresh
branch
from
October 7, 2026 07:31
1dafe2d to
ffa60cc
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
pinOrder()insrc/js/store.jsrequiredinject_order > 0and mapped anything else to the9999tail sentinel. The commit chain itself was intact (set_pin_order→ flipwheelSortto manual →loadPrompts/rebuildIndex/renderPrompts→renderWheelMirror), but a committed position of0— e.g. a 0-based write, or a pack-authored sort weight of"0"(inject_orderis user-facing pack data, seeGUI_RENOVATION_GUIDE.md) — silently sorted to the tail, so the re-rendered mirror showed the old order.inject_orderis now honored as an explicit position; only missing/unparseable values get the sentinel.position:fixed, the.wm-insertmarker is removed and the row restored on drop before commit — a rejectedset_pin_orderleaves the pre-drag order intact.tests/e2e/wheel_sort_drag_e2e.py: durable localStorage-backed mock (set_pin_orderwrites 1-based strings exactly like Rust(i+1).to_string()); post-drop asserts submitted ids == rendered DOM order (pointer + keyboard paths); realpage.reload()persistence check (the old check claimed "after reload" but never reloaded); rejected-commit rollback case;inject_order "0"ranks-first regression guard; DOM-order waits report named FAILs instead of crashing on timeout.Verified
wheel_sort_drag_e2e.py: 26/26 PASS. Negative proofs: refresh chain removed → 5 named FAILs;pinOrderreverted →'0' ranks firstFAIL.hotkey_status_e2e10/10,hotkey_recorder_e2e22/22,no_tauri_e2e13/13 — no regressions..draggrip); grip hascursor:grab+ hover reveal instyles.css.Test plan
python3 tests/e2e/wheel_sort_drag_e2e.py— ALL PASS locallyGenerated with Devin