Commit Graph

11 Commits

Author SHA1 Message Date
dev b626fb7d41 fix(bundle): stop pre-escaping gym name in embedded dom.js (apostrophe fix)
The embedded currentAttribute() in the bundle was returning gym:
tatEsc(gym), but the render template in Dialog.render also escapes with
tatEsc(s.gym). The double-escape turned 'George's' into 'George's',
which the browser decoded to the visible text 'George's'.

The src/dom.js source does NOT pre-escape (returns the raw gym string and
lets the render template handle escaping once). This commit restores the
mirror in the embedded dom.js so the bundle matches the source.

No changes to src/dom.js (it was already correct).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 14:00:40 -05:00
dev c6de810417 feat(bundle): mirror source changes in embedded userscript 2026-06-07 12:17:29 -05:00
dev 7fddd84b6a fix(bundle): mirror source fixes in embedded userscript 2026-06-07 09:00:40 -05:00
Claude Opus 4.8 d494093139 fix(bundle): mirror source fixes in embedded userscript 2026-06-06 09:15:13 -05:00
dev 8d89e40b91 fix(bundle): mirror source fixes in embedded userscript 2026-06-05 08:43:22 -05:00
Claude 76e3ba2488 fix(bundle): mirror source fixes in embedded userscript
Mirrors the three src/ changes into the embedded copy in
torn-attribute-tracker.user.js:

1. Hoist the four let bindings (lastSnapshot, lastAttr, lastDelta,
   anchorError) to the top of start(), before dialog.mount() and
   applyMode(), so the anchor-miss branch of applyMode() can write
   anchorError without tripping the TDZ.

2. Default the floating dialog to bottom-left (left: 20px, bottom: 20px)
   in both Dialog.mount() and Dialog.setMode()'s 'free' branch.

3. One-time migration: if prefs.pos has any non-zero coordinate on load
   (a residue of the bottom-right era), reset it to {x: 0, y: 0} and log
   to the console. Stored position from any subsequent drag is preserved.

4. Wrap the start() body in try/catch and log failures to the console,
   so an unexpected error (e.g. TornTools conflict, future regressions)
   does not prevent the dialog from appearing.

All four changes are byte-equivalent to the corresponding src/ changes;
the build-time drift tests in tests/build.test.js still pass.
2026-06-01 22:24:57 -05:00
dev 578736a492 fix(test): adjust comment formatting for clarity in computeEstimate tests 2026-06-01 21:42:39 -05:00
Claude a061410f16 fix(bundle): mirror source fixes in embedded userscript
Mirror the three source-level fixes in the embedded copies inside
torn-attribute-tracker.user.js:

1. _wireHeaderDrag: add the .tat-header closest() guard so the bundle
   no longer steals focus from inputs/selects.
2. findAnchorElement: replace the narrow 'button[name="train"]' query
   with the priority-ordered candidate list and the gym-panel last-
   ditch fallback.
3. Inline anchor-error UX: add the anchorError state, include it in
   the snapshot, surface it via applyMode, render the note with the
   .tat-anchor-err class, and add the corresponding CSS rule.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 18:47:39 -05:00
dev e21582b7c4 fix(bundle): strict 30-day boundary in pruneHistory to match src/pure.js 2026-06-01 17:59:06 -05:00
dev 75f10126d2 fix(bundle): floor perDay in summary and hoist self alias in render 2026-06-01 17:28:41 -05:00
dev 7c2533d188 feat: bundle torn-attribute-tracker.user.js (Tat-style Tampermonkey script) 2026-06-01 17:16:54 -05:00