codeburn/dash
ozymandiashh 525b3c1d71 fix(dash): keep the disambiguator visible, make the bootstrap safe by construction
Three follow-ups from an adversarial pass over this branch.

The title cap was sized against the wrong number. 80 code points was chosen
"for both the max-w-40 legend and the tooltip", but max-w-40 is 160px and the
legend renders at text-[10px], which shows roughly 32 characters. Everything
past that is clipped -- and that is exactly where the short session id, the
provider and every collision-tier suffix lived. Two sessions in one repository
whose AI titles share a 32-character prefix rendered as the same legend entry,
which is worse than main and is the scenario #997 is about. The label now leads
with the disambiguator so it is always inside the visible width, and both the
legend and the tooltip carry title= so the full label is reachable on hover.

injectDashboardBootstrap was not safe by construction. Extracting the helper
fixed the $-substitution problem but left the security-critical '<' escaping at
the call site 94 lines away, and the new test called the helper with raw
JSON.stringify output -- so deleting that escape left every test green while
the served page became injectable through any project, device or model name.
Nothing in tests/ asserted that escaping at all. The escaping moves inside the
helper, with a test that pushes </script> through a payload value.

preferredSessionTitle picked alphabetically, not most recently. types.ts
documents title as the last ai-title entry, so when one session id yields two
summaries the legend could show the superseded one. It now picks the greatest
lastTimestamp, keeping the alphabetical order only to break exact ties so the
result stays deterministic. Entries are also ordered by key before the
collision tiers run, so the same corpus cannot emit a different label set
depending on input order.
2026-08-18 05:49:16 +03:00
..
public brand: restore binary 0101 flame across all surfaces 2026-07-17 14:14:40 -07:00
src fix(dash): keep the disambiguator visible, make the bootstrap safe by construction 2026-08-18 05:49:16 +03:00
index.html feat(dash): dark mode with pre-paint bootstrap and themed charts 2026-08-04 01:53:06 +03:00
package-lock.json feat(web): local React dashboard served by codeburn web (#531) 2026-06-20 16:21:25 +02:00
package.json feat(web): local React dashboard served by codeburn web (#531) 2026-06-20 16:21:25 +02:00
tsconfig.json feat(web): local React dashboard served by codeburn web (#531) 2026-06-20 16:21:25 +02:00
vite.config.ts feat(web): local React dashboard served by codeburn web (#531) 2026-06-20 16:21:25 +02:00