Re-anchors the fit tooltip onto the swapped workbench's real slot positions #77

Merged
miko merged 1 commit from feat/fit-tip-reanchor-geometry into main 2026-11-02 00:06:54 +00:00
Owner

Fixes the returning fitting bug: changing a module's state (online, overheat) sent its tooltip to the top-left corner.

Root cause: a state change swaps the whole workbench for the fresh simulate fragment. The fresh slots' positions ride data-left / data-top (CSP forbids inline styles) until app.js's geometry pass applies them, and that pass runs from a MutationObserver, which fires after the swap handler finishes. The handler re-anchors the open tooltip synchronously, so it measured every fresh slot at the visual's top-left corner, where an unpositioned slot sits, and placed the tooltip there.

The fix applies the geometry pass to the fresh workbench inside the swap handler, before the re-anchor measures anything. app.js exposes the pass as EveSynapseContent.applyDataGeometry; the observer's later run over the same elements is idempotent.

Tests: a new case in fit.tip.test.js models the production timing (swapped slots at the corner until the pass runs) and pins the re-anchored tooltip to the slot's real position; it fails without the fit.js change and passes with it. The full fit.tip suite (13) and the loadout preview, phone views, swap and tabs suites all pass.

Fixes the returning fitting bug: changing a module's state (online, overheat) sent its tooltip to the top-left corner. Root cause: a state change swaps the whole workbench for the fresh simulate fragment. The fresh slots' positions ride data-left / data-top (CSP forbids inline styles) until app.js's geometry pass applies them, and that pass runs from a MutationObserver, which fires after the swap handler finishes. The handler re-anchors the open tooltip synchronously, so it measured every fresh slot at the visual's top-left corner, where an unpositioned slot sits, and placed the tooltip there. The fix applies the geometry pass to the fresh workbench inside the swap handler, before the re-anchor measures anything. app.js exposes the pass as EveSynapseContent.applyDataGeometry; the observer's later run over the same elements is idempotent. Tests: a new case in fit.tip.test.js models the production timing (swapped slots at the corner until the pass runs) and pins the re-anchored tooltip to the slot's real position; it fails without the fit.js change and passes with it. The full fit.tip suite (13) and the loadout preview, phone views, swap and tabs suites all pass.
Re-anchors the fit tooltip onto the swapped workbench's real slot positions
All checks were successful
github/analysis Analysis gate on GitHub runners
github/test Test gate on GitHub runners
github/core-only Core-only gate on GitHub runners
github/race Race gate on GitHub runners
150c1ee354
A module state change swaps the whole workbench for the fresh
simulate fragment, whose slot positions ride data-left and
data-top until app.js's geometry pass applies them. That pass
runs from a MutationObserver, which fires after the swap
handler, so the tooltip re-anchor measured every fresh slot at
the visual's top-left corner and placed the tooltip there.

app.js now exposes the geometry pass on EveSynapseContent, and
the swap handler applies it to the fresh workbench before
re-anchoring. The pass is idempotent; the observer's later run
over the same elements sets the same values.
miko merged commit da68cf5181 into main 2026-11-02 00:06:54 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
EveSynapse/evesynapse!77
No description provided.