tux-review 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -561,11 +561,24 @@
561
561
  // resize/scroll/DOM mutations (rAF-throttled) so markers follow layout
562
562
  // changes: splitter drag, carousel transforms, dialogs opening and
563
563
  // closing, route-level reflows. Invisible targets hide their pin and
564
- // reveal it again when the element becomes visible (SPC 60).
564
+ // reveal it again when the element becomes visible (SPC 60). The
565
+ // overlay host is recomputed on every pass, so a pin restored while
566
+ // its dialog is closed re-parents into the dialog the moment it opens
567
+ // (and back out when it closes) — otherwise it would stay parked in
568
+ // the page layer, covered by the dialog backdrop.
565
569
  let pinRegistry = [];
566
570
  function positionPins() {
571
+ const layer = root() ? root().querySelector('[data-tux-layer]') : null;
567
572
  for (const entry of pinRegistry) {
568
- const { pin, target, inTopLayer } = entry;
573
+ const { pin, target } = entry;
574
+ const host = overlayHostFor(target);
575
+ if (pin.parentElement !== host) {
576
+ host.appendChild(pin);
577
+ entry.inTopLayer = host !== layer;
578
+ pin.style.position = entry.inTopLayer ? 'fixed' : '';
579
+ entry.lastKey = '';
580
+ }
581
+ const inTopLayer = entry.inTopLayer;
569
582
  const rects = target.getClientRects();
570
583
  const rect = target.getBoundingClientRect();
571
584
  const visible = rects.length > 0 && rect.width > 0 && rect.height > 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tux-review",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "TUX - TUX UIX review system: attach structured, machine-readable feedback directly to running web UIs (pages, routes, components, elements, states) with a deterministic CLI, canonical JSON and LLM-friendly skills.",
5
5
  "license": "MIT",
6
6
  "author": {
package/src/cli.js CHANGED
@@ -7,13 +7,20 @@
7
7
  *
8
8
  * @module cli
9
9
  */
10
+ import { readFileSync } from 'node:fs';
11
+ import { dirname, join } from 'node:path';
12
+ import { fileURLToPath } from 'node:url';
10
13
  import { CliError, EXIT } from './errors.js';
11
14
  import { loadConfig } from './config.js';
12
15
  import { opShow, opCreate, opUpdate, opDelete, opClear, opExport, opIncorporate, opValidate } from './feedback.js';
13
16
  import { opDesignInstall, opDesignCreate, opLiveCreate, opDesignStart, opDesignStatus, opDesignStop } from './design.js';
14
17
  import { opLiveInstall, opLiveStart, opLiveStatus, opLiveStop } from './live.js';
15
18
 
16
- export const VERSION = '0.1.0';
19
+ // Single source of truth is package.json — a hardcoded constant here
20
+ // drifted to 0.1.0 after the 0.1.1 release and broke the install test.
21
+ export const VERSION = JSON.parse(
22
+ readFileSync(join(dirname(fileURLToPath(import.meta.url)), '..', 'package.json'), 'utf8'),
23
+ ).version;
17
24
 
18
25
  const VALUE_FLAGS = new Set([
19
26
  'config', 'format', 'type', 'text', 'route', 'page', 'component', 'component-instance', 'instance',
package/src/server.js CHANGED
@@ -303,8 +303,15 @@ function proxy(state, req, res) {
303
303
  const chunks = [];
304
304
  up.on('data', (c) => chunks.push(c));
305
305
  up.on('end', () => {
306
- res.writeHead(up.statusCode, up.headers);
307
- res.end(inject(Buffer.concat(chunks).toString('utf8')));
306
+ // injection lengthens the body — the upstream Content-Length must
307
+ // not be forwarded or clients truncate/wait on the response
308
+ const body = inject(Buffer.concat(chunks).toString('utf8'));
309
+ const headers = { ...up.headers };
310
+ delete headers['transfer-encoding'];
311
+ headers['content-length'] = String(Buffer.byteLength(body));
312
+ headers['cache-control'] = 'no-store';
313
+ res.writeHead(up.statusCode, headers);
314
+ res.end(body);
308
315
  });
309
316
  return;
310
317
  }