U click-targets (the producer half of BRO-005 mouse nav)
BRO-005 landed the pager's click→U-target CONSUMER (be/views/bro/pager.js _uriAt/_screenToByte), but NO JS view emits U tokens, so a click finds no target and mouse nav is inert. The C views DO emit U (sniff/LS.c, graf/GRAF.c, sniff/SNIFF.exe.c, bro/BRO.c). This ports U-target EMISSION to the JS views, per-view, mirroring C. Method: Issues.
be/views/bro/pager.js _uriAt): for a clickable token,
the NEXT token must be tag U, and its hidden text bytes [prevEnd..end) ARE the URI. Mirrors C tok32Pack('U', u8bDataLen(out)) (graf/GRAF.c:522,535).
text length); (2) append the URI bytes to the hunk TEXT; (3) push a token tagged U with end = new text length. Tok pack: ((tag & 0x1f) << 27) | (end & 0xffffff), tag U = 'U'.charCodeAt(0) - 65 = 20. The committed be/views/log/log.js (tok() / appendRow / spans) is the JS tok-build model.
U bytes stay hidden in plain + colour (the pager skips them; _uriAt reads them).U click-targets matching its C counterpart, so aleft-click in the pager navigates to the row/token's URI (end-to-end with BRO-005).
_uriAt EXACTLY (visible tok → U tok → URI bytes). No new hunk format.
Plain/colour output unchanged except the (hidden) U bytes. Repro-first (CLAUDE §17).
be/views/{ls,lsr,tree}/*.js) ← sniff/LS.c — each entry → U to its path.be/views/log/log.js) ← graf/LOG.c + graf/GRAF.c:522/535 — commit/file rows → U.be/views/diff/diff.js) ← graf/GRAF.c — file headers/hunks → U to file:line.be/views/status/status.js) ← sniff/SNIFF.exe.c — per-file rows → U to the file.be/views/cat/cat.js) ← bro/BRO.c — grepable tokens → U.be/views/commit/commit.js) ← keeper/PROJ.c — tree → tree:?<sha>,
parent → commit:?<sha>; synthetic commit header carries NO U. C cat-view emits NO per-token U (its 8 'U' sites are CONSUMERS); its only file-view symbol nav is right-click grep:#<word> (bro_word_around, BRO.c:2968/1108). Ported to a left-click U: each grepable token → U grep:#<token>. JS tok.parse has no DEFMark (ids are S, not N/C), so the gate is byte-level (word char / >=0x80), matching bro_word_around.
'U' in their C) have no C model — out of scope here.fda1986f; commit U-links aef4caef;
consumed by the BRO-005 pager (579b251f + 4febec96).
views/log/log.js:340-398 appendRow splices a hidden
commit:?<sha> + TAG_U(20) U tok per sha8 (mirrors LOG.c:260/GRAF.c:535).
be/test/log/links/{run.sh,check.js} (glob be-js-log-links) GREEN; U-
targets match native be log: --tlv, plain byte-identical (LOG-001 kept).
views/cat/cat.js:36-66 withLinks rebuilds body+toks
in lockstep (GRAF.c:517-535 model), splicing grep:#<token> + TAG_U(20) U after each grepable token; wired at views/cat/cat.js:153-155.
be/test/cat/links/{run.sh,links.js} (glob be-js-cat-links) GREEN;
RED→GREEN verified, plain/visible bytes byte-identical (U hidden), e2e through pager _uriAt. DEFERRED: a cross-file jump to a symbol's DEFINITION needs a symbol index cat.js lacks (no spot:/path:line target — grep only).
views/diff/diff.js:37-47 withUTarget appends the
hunk's own diff:<path>?<navver>#L<n> uri + TAG_U(20) U tok per hunk; the handler's diffOut (:311-320) feeds it to ctx.sink, emitHunks (:121-131) feeds the raw record, prefixingSink (:291-305) prefixes the sub uri too.
be/test/diff/links/{run.sh,links.js} (glob be-js-diff-links) GREEN;
RED→GREEN verified, U-target decodes to the hunk file URI, .plain render byte-identical (U hidden). NOTE: the JS diff view is still inert e2e (ctx.views unwired, 5 cases xfail) — the producer logic + unit test land; e2e is separate.
views/status/status.js:265-267 emits a per-file nav
(diff: for mod, else cat:, move→DST); sinkOut (:108-176) builds a HUNK (text+tok32, hidden TAG U=20) fed to ctx.sink for the pager/--tlv (mode-gated :76-84), while plain/colour keep ctx.out (parity). Mirrors SNIFF.exe.c:539.
be/test/status/links/{run.sh,assert_u.js} (glob be-js-status-links)
GREEN; RED→GREEN verified (flat text → no toks pre-fix), U-targets byte-match native be status --tlv, plain byte-identical; e2e _uriAt on a path click resolves diff:/cat:. be/ suite 68/69 (lone red = stale bro-universal xfail).
views/ls/ls.js:43-94 appendRow/emitHunk build
ONE content HUNK (text+tok32, hidden U=20 per row) fed to ctx.sink; wired mode- gated at ls.js:130,169-178 (sink for color/--tlv, ctx.out columnar for plain). Row→nav: file cat:<navPfx+name>, move cat:<dst>, dir ls:<sub>/. lsr inherits (one-line re-export). tree views/tree/tree.js:51-66,160,209-237: blob blob:<path>, tree tree:<path>/, .. row no U. Mirrors LS.c:79-92/HUNK.c:1454-1520.
be/test/ls/links/{run.sh,assert_u.js} (glob be-js-ls-links) GREEN;
RED→GREEN verified (pre-fix --tlv had NO HUNK → no U). U-targets decode via pager _uriAt/hunksFromTlv; ls/tree root plain byte-identical to native, scoped plain stable (U hidden). ls/listing+ls/submount stay GREEN. be/ suite 58 pass / 9 red = the documented xfail set (diff5, spot2, regex, put-bare).
views/commit/commit.js:193-202 buildHunk tags each
tree/parent sha value with a uri (tree → tree:?<sha40>, parent → commit:?<sha40>); :245-262 splices the URI bytes + TAG_U(20) U tok after that span into a U-bearing body, fed by the handler (:331-338) for color/tlv while plain keeps the U-free body+empty toks (COMMIT-003 parity). Synthetic commit <sha> header carries NO U (PROJ.c:431-436; COMMIT-001's diff:?<sha> link stays superseded by COMMIT-002's relay). COMMIT-003/004/005 preserved.
be/test/commit/links/{run.sh,check.js} (glob be-js-commit-links)
GREEN; RED→GREEN verified (pre-fix --tlv had 0 U toks → 0 targets, post-fix 2). U targets decode via pager _uriAt on a 2-commit chain; --plain byte- identical to native metadata (U hidden, no :? leak). commit/render+resolve stay GREEN; sibling links (log/cat/status/ls) unaffected.
--plain is htbl_trim'd (no trailing
blank); the JS non-tty dump uses bro.renderHunkLog→HUNKu8sFeedText which appends a separator \n and never trims. So PLAIN ls keeps the columnar ctx.out path (byte-exact); only color/--tlv take the U-bearing sink.