Skip to content

feat(ui): WebUI modernization PR1 — hygiene, design tokens, type floor, self-hosted font#109

Merged
jkyberneees merged 1 commit into
mainfrom
feat/webui-modernization-1
Jul 26, 2026
Merged

feat(ui): WebUI modernization PR1 — hygiene, design tokens, type floor, self-hosted font#109
jkyberneees merged 1 commit into
mainfrom
feat/webui-modernization-1

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Summary

First PR of the WebUI modernization roadmap — Phase 0 (hygiene) + Phase 1 foundation (design tokens, type floor, contrast, self-hosted font). No behavioral changes beyond readability improvements.

Phase 0 — hygiene

Dead code removed:

  • initParticles() — targeted a nonexistent #particles element
  • addTypingIndicator() — defined but never called (also removed the orphaned selector in pruneMessages)
  • #stats-bar — written on connect but never meaningfully displayed
  • .li-spinner legacy CSS
  • Dead .approval-dialog fallback branch in the friction-mode code (HTML uses the id, so the ?.appendChild path could never fire)

Duplication extracted:

  • resetTurnState() — replaces three identical streaming/tool-state reset blocks (send, newSession, loadAndRenderSession)
  • ensureSessionToken() — replaces two identical session-token bootstrap blocks (executeDeleteSession, renameSession)
  • copyTextToClipboard() — one clipboard helper with execCommand fallback, shared by copyCode and copyMessage

Micro-bugs fixed:

  • Collapse-threshold mismatch: JS measured 500px but CSS caps at 460px, so content between 460–500px clipped with no expander. Now a shared COLLAPSE_MAX_HEIGHT_PX = 460 constant.
  • escapeAttr now also escapes < and >
  • tb- class-prefix collision (topbar vs tool block) — topbar renamed to top-*
  • Mesage comment typo

Phase 1 — design system foundation

  • Token scales in :root: type (--fs-xs…xl), spacing (--space-1…8, 4px grid), radius (--r-sm/md/lg) — the base for component work in later PRs.
  • 11px type floor: all 42 font-size declarations below 11px (down to 8px) raised to 11px for WCAG AA readability.
  • Contrast: --text-3 lifted #706e68#8a8880 (~5.5:1 on the carbon background).
  • Self-hosted font: Azeret Mono variable woff2 (26 KB, weights 100–700) embedded at ui/fonts/ and served via the static file map; Google Fonts CDN links removed — the UI now works fully offline/air-gapped (and drops the third-party request).

Verification

  • node --check cmd/odek/ui/app.js ✅, go vet ✅, full cmd/odek test suite ✅
  • Live smoke test of odek serve: /, /style.css, /app.js, /fonts/azeret-mono.woff2 all return 200 ✅

…r, self-hosted font

First PR of the WebUI modernization roadmap (Phase 0 + Phase 1 foundation).

Phase 0 — hygiene:
- Remove dead code: initParticles (targeted nonexistent #particles),
  addTypingIndicator (never called), #stats-bar element + writes,
  .li-spinner legacy CSS, dead .approval-dialog fallback branch.
- Deduplicate: extract resetTurnState() from the three identical
  streaming-state reset blocks (send / newSession / loadAndRenderSession);
  extract ensureSessionToken() from the two identical session-token
  bootstrap blocks (delete / rename); unify clipboard writes behind
  copyTextToClipboard() with execCommand fallback.
- Micro-bugs: collapse threshold mismatch (JS measured 500px, CSS capped
  460px — content could clip with no expander; now shared constant 460),
  escapeAttr now also escapes < and >, tb- class-prefix collision between
  topbar and tool blocks resolved (topbar renamed to top-*), Mesage typo.

Phase 1 — design system foundation:
- Token scales in :root: type (--fs-xs..xl, 11px floor), spacing
  (--space-1..8, 4px grid), radius (--r-sm/md/lg).
- 11px type floor: every font-size below 11px (42 declarations down to
  8px) raised to 11px for WCAG AA readability.
- Contrast: --text-3 lifted from #706e68 to #8a8880 (~5.5:1 on the carbon
  background) so tertiary text passes AA at the new floor size.
- Self-hosted font: Azeret Mono variable woff2 (26 KB, weights 100-700)
  embedded at ui/fonts/ and served at /fonts/azeret-mono.woff2 via the
  static file map; Google Fonts CDN links removed - the UI now works
  fully offline/air-gapped.

Verified: node --check, go vet, full cmd/odek test suite, and a live
smoke test of odek serve (/, /style.css, /app.js, /fonts/azeret-mono.woff2
all 200). No behavioral changes beyond readability improvements.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
odek 60c2ee1 Commit Preview URL

Branch Preview URL
Jul 26 2026, 12:22 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant