Commit Graph
6 Commits
Author SHA1 Message Date
ancsemi fe5ed5b8a0 Replace em dashes in client code comments and styles 2026-10-10 16:08:55 -04:00
ancsemi 0b8c04e708 Replace em dashes in the English UI text and messages 2026-10-10 16:08:54 -04:00
ancsemi 40780a02b1 Braid and Amni-Scient themes keep the emoji fallback in their font stacks; a blank line between the font notices 2026-09-25 21:33:30 -04:00
ancsemi d26efd3815 Stop white button labels sitting on light theme accents
Accent-filled controls (Join, Send, admin Save, active tabs, the Android
promo badge, and 25 more) hardcoded color:white on background:var(--accent).
That is fine on the default purple, but 14 themes use a light accent, so
the label was near-invisible: tron 1.39:1, ice 1.77:1, crt 1.83:1, nord
2.00:1, and the bundled braid theme worst of all at 1.33:1, which is the
mint Join button that got reported.

Added an --accent-text token, white by default so nothing changes for the
themes that were already fine, and overrode it on the 14 light-accent
themes with a dark drawn from each theme's own palette rather than flat
black. Those now land between 6.24:1 and 13.31:1. The 31 rules that
hardcoded white now read the token, so custom themes can set it too.

Left alone: matrix and fallout invert the button entirely (dark fill,
accent text, glowing border) as a deliberate terminal look and measure
13.49:1 and 12.62:1, and haven/chapel/midnightpurple/cloudy/cyberpunk sit
at 3.59:1 to 4.38:1 on saturated brand colours where white reads as
intended and dark would not look right.
2026-08-12 21:47:47 -04:00
ancsemi 1aed4c50ab Give grouped messages and their group leader one left edge
A group leader indents its text by (row padding + avatar + gap). The messages
that follow it have no avatar, so they pad by that same total to line up. Both
numbers were written out by hand in five places, and two of them disagreed:
the spacious density set the leader side to 70px but never got a matching
compact rule, so follow-ups sat 14px to its left, and the Braid themes resized
the row and avatar with !important while leaving the compact side alone, for
8px. Two separate reports, one defect.

One side is now derived from the other through --msg-gutter, and density
tiers, breakpoints and themes set only the parts. The two cannot drift apart
again, and a theme that follows the same convention gets it right for free.
The ~480px breakpoint was 4px out for the same reason and is fixed too.

Measured against a live server: leader and follow-up left edges are identical
across cozy/compact/spacious at 1280/760/350px, and under both Braid themes.
2026-08-10 00:46:58 -04:00
Amnibro f233849c08 Fix silent crash on launch (swallowed bind errors), allow Node 24, and add opt-in Braid themes + layout plugin (#5471)
* Fail loudly when the server port cannot be bound, and stop refusing Node 24

A failed bind (EADDRINUSE/EACCES/EADDRNOTAVAIL) surfaces as an async
'error' event on the HTTP server. With no listener there, it fell
through to the global uncaughtException keep-alive, which logged it to
crash.log and kept a process alive that never got its socket: no
banner, no exit code, and Start Haven.bat's netstat readiness probe
was satisfied by the stale port-holder — so launches died silently.
Reproduced on 3.39.0 by double-launching; %APPDATA%\Haven\crash.log
shows the same swallowed EADDRINUSE in the wild.

- server.js: bind failures on the main listener are now fatal and
  explain themselves (which port, why, what to do) before exit 1.
  Other server errors keep the existing keep-alive behaviour.
- server.js: the HTTP->HTTPS redirect listener (port+1) warns and
  continues instead of feeding the same silent uncaught path.
- Start Haven.bat: the hard Node >=24 refusal is gone — Node 24 is
  current LTS and better-sqlite3 12.10.0 ships prebuilds for it
  (verified working). The honest gate is a functional
  require('better-sqlite3') check after npm install; >=25 warns.
- package.json/lock: engines widened to >=18 <25 (lock version also
  synced from stale 3.31.2).

* Add Braid themes (dark/light) and the Braid Layout plugin

Ports the Braid look from the Amni-Haven mobile app to the web and
desktop clients, as pure opt-ins riding the existing rails — no core
file changes:

- themes/braid.theme.css / braid-light.theme.css: the mobile BRAID /
  BRAID_LIGHT palettes (mint on slate / deep green on white) with the
  1.6x-rounder shape language. Unpublished by default; admins opt in
  via Settings -> Custom Themes, exactly like any file theme.
- plugins/BraidLayout.plugin.js: the 'vastly simplified' two-edge
  layout — folds the server rail (including manage/sync) into a strip
  atop the sidebar, tucks header extras into a kebab menu, and uses
  the full width for messages. Every stock feature stays reachable:
  the kebab proxies search/pins/gallery/channel code/encryption/
  settings and adds People, Soundboard, Status bar, and app-download
  entries for the chrome it hides. A separate variable-driven shape
  layer applies the Braid format (radii, blur, focus rings) on top of
  ANY active theme, so all built-in themes reskin the Braid layout
  with their own palette. start()/stop() fully applies and fully
  restores (DOM, styles, listeners, localStorage); the
  MutationObserver is childList-only and only mutates
  styles/attributes, so it cannot observe its own writes.

All sizes are rem so the interface Zoom slider scales Braid chrome
together with the rest of the UI. prefers-reduced-motion disables the
motion layer outright.

* Braid Layout: mobile-parity chat cards and condensed chrome

Feedback round: the flat message list didn't carry the mobile Braid
shape language, and leftover strips still read as four-edge chrome.

- Merged run cards (desktop twin of Haven-Mobile's braidForm): a run of
  same-author posts becomes one bordered card on .message-body, dashed
  seams between posts, avatar and hover-timestamp in the gutter, own
  messages tinted with the accent. Run position comes from O(n)
  data-braid-run marking in the existing observer batch — NOT
  :has(+ .message-compact), which makes Chromium re-run invalidation
  per sibling insert and sent a 600-message channel load quadratic.
  Channel list runs are carded the same way.
- Condensed chrome: the topic bar folds into the header band as a
  quiet subtitle (no second border strip), header drops to 3rem,
  sidebar footer and composer tighten, media buttons shrink to 2rem.
- All gutter math is rem (.625 pad + 2.25 avatar + .75 gap = 3.625rem)
  so cards and compacts stay aligned under interface zoom.

* Braid Layout v1.2: Mod Mode interop, themed icons, modern settings, subtler seams

- Mod Mode (the layout editor) is now fully functional with Braid on:
  the layer suspends itself while body.mod-mode-on is set — gates come
  off and the server rail unfolds so every draggable section and panel
  handle is real — and re-applies when editing ends. A saved custom
  section order wins over Braid's default join/create-at-bottom
  ordering (the order rules load only when no haven-layout is stored).
  'Edit layout' joins the kebab menu.
- The bottom-left emoji buttons (theme/activities/members/settings/
  donate/mute/deafen) become currentColor line icons so they follow the
  palette like the rest of the chrome; originals restore on disable.
- Modern settings: nav rail becomes grouped pills with an accent-tinted
  active state, each settings section becomes a rounded card (the
  inline border-top hairlines between sections retire), header gets the
  blur band + pill tabs treatment.
- The seam between same-author posts shrinks to a centered dotted
  hairline (min(7rem,45%)) instead of a full-width dashed rule.

* Braid Layout v1.3: true author-run merging, hamburger menu, text sliders, hex loader, logo glow

- Message merging now chains on AUTHOR: consecutive posts by the same
  user merge into one card even when the app rendered them as separate
  full .message elements (persona changes, break_chain, and system
  notices still split). Continuing messages hide their avatar/header
  and surface their own timestamp in the gutter on hover
  (data-time-short). The visible full-width divider is gone — bodies
  inside a run no longer draw internal horizontal borders, so the only
  separator is the small centered dotted seam.
- One animated hamburger (morphs to an X) replaces both the header
  kebab and the bottom-left icon bar: grouped Channel / View / App menu
  with staggered item animation. The menu mounts on <body> — the
  blurred header is a containing block with overflow:hidden that clips
  even position:fixed descendants. Every absorbed feature keeps its
  door (themes, activities, members, settings, donate, apps, Mod Mode).
- Braid text size: two continuous sliders in Settings (chat text
  80-160%, interface text 85-140%) layered over rem zoom, live-applied
  via CSS vars and persisted per user.
- The brand hexagon gets an accent glow that breathes (and a slow spin
  on hover); a hexagonal loading indicator appears on channel switches
  and reskins the setup wizard's circular spinner. All animations
  respect prefers-reduced-motion.
- Braid / Braid Light themes: type & color enforcement pass — the font
  stack and palette land over style.css's per-element declarations
  (fonts on all controls, selection/placeholder/link/timestamp colors),
  and the own-message tint calms from 12% to 8% accent.

* Braid Layout v1.4: hamburger moves home to the bottom-left, settings nav gets real pills and themed icons

- The hamburger relocates to the bottom-left corner where the icon bar
  it absorbed used to live — the popups it opens (themes, activities)
  anchor down there, so the menu and its children now share a corner
  instead of spawning across the screen from the button. It is styled
  as a Haven tile (bordered, bg-tertiary, accent hover) with a Menu
  label, and the grouped menu rises from the bottom-left with the same
  morph-to-X and stagger.
- Settings nav highlights now encompass their rows: stock uses a
  hanging-indent hack (padding-left 1.625rem + text-indent -16px) so
  wrapped labels clear the leading emoji, which pulled the first line
  left out of the highlight pill. Items are now full-width flex pills
  with text-indent reset — and every leading emoji (nav rows and the
  User/Admin tabs) becomes a currentColor line glyph keyed by
  data-target, same treatment as the old bottom-left buttons, with a
  Haven hexagon fallback for unmapped rows. Originals restore on
  disable.
2026-08-02 20:56:15 -04:00