Skip to content

fix(jira): inline reorder arrows, fix first/last disabled reactivity - #141

Merged
wgordon17 merged 3 commits into
gordon-code:mainfrom
wgordon17:worktree-jira-reorder-arrows-spacing
Aug 26, 2026
Merged

fix(jira): inline reorder arrows, fix first/last disabled reactivity#141
wgordon17 merged 3 commits into
gordon-code:mainfrom
wgordon17:worktree-jira-reorder-arrows-spacing

Conversation

@wgordon17

Copy link
Copy Markdown
Member

Summary

  • Lay the custom-order reorder arrows out inline (side by side) instead of stacked, so Assigned-tab rows return to content-driven height instead of the sparse rows the vertical stack forced.
  • Make the first/last boundary state reactive: it was snapshotted per row at first render, but the keyed <For> moves cached row nodes on reorder without re-running the callback, so the originally-first row kept its up arrow disabled after moving and whatever landed on top never got disabled. Passing isFirst/isLast as accessors re-tracks each row's live index.

@wgordon17
wgordon17 marked this pull request as ready for review August 26, 2026 19:48
@wgordon17
wgordon17 requested a review from a team August 26, 2026 19:48
@wgordon17
wgordon17 force-pushed the worktree-jira-reorder-arrows-spacing branch from 4837c87 to 71af46a Compare August 26, 2026 19:48
The custom-order reorder controls stacked the up/down arrows vertically,
forcing each row taller than its content and leaving the Assigned tab far
sparser than the non-reorder view. Lay the arrows out inline (side by side)
so row height is content-driven again.

Also make the first/last boundary state reactive: it was snapshotted into a
plain object when each row first rendered, but the keyed <For> moves cached
row nodes on reorder without re-running the callback, so the originally-first
row kept its up arrow disabled after moving and whatever landed on top never
got disabled. Passing isFirst/isLast as accessors re-tracks the row's live
index on every reorder.
Guards the fix in the preceding commit: drives a custom-order reorder
through the reactive prop layer (no click, so the reordering() lockout is
not involved) and asserts the up/down disabled state follows each row's
live position. Moving PROJ-1 first->last exercises both isFirst and isLast
dynamically. Verified to fail against the pre-fix snapshot boundary and
pass against the accessor-based fix.
@wgordon17
wgordon17 force-pushed the worktree-jira-reorder-arrows-spacing branch from 71af46a to 8762265 Compare August 26, 2026 19:51
The auth store's cross-tab storage listener fires a fire-and-forget
fetch("https://api.github.com/user") on token replacement. One test
("updates token signal when another tab writes a different non-null value")
dispatched that storage event without stubbing fetch, so a real happy-dom
request was left in flight; vi.resetModules across the file accumulates
listeners on the shared window, so a single dispatch launched many. When
vitest tore down the window it aborted those requests and happy-dom's abort
path double-closed the response body stream ("Invalid state: Controller is
already closed"), an uncaught error that failed the whole run — flakily,
since it only bit when a request was still in flight at teardown (CI load).

Two-layer fix:
- Stub fetch in the offending test and let the fire-and-forget settle.
- Add tests/fetch-guard.ts: default fetch to a fast network error so any
  unmocked fetch fails cheaply and deterministically instead of leaking a
  live request. Wired only into the workspace "browser" project, so the
  live-network smoke suite (which shares tests/setup.ts) stays unguarded.
@wgordon17
wgordon17 merged commit dfd12a0 into gordon-code:main Aug 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant