Commit Graph
196 Commits
Author SHA1 Message Date
Timothy Jaeryang Baek e623c02acc refac 2026-08-23 15:06:30 -04:00
Timothy Jaeryang Baek 78f48a21ee refac 2026-08-23 14:40:48 -04:00
Timothy Jaeryang Baek 75df30c0ea refac 2026-08-16 23:47:02 -07:00
Timothy Jaeryang Baek ce3c175e26 refac 2026-08-10 23:13:10 -06:00
Timothy Jaeryang Baek 810378c0b8 refac 2026-07-27 19:39:36 -04:00
Timothy Jaeryang Baek b6b16d5871 refac 2026-07-27 19:24:03 -04:00
Timothy Jaeryang BaekandVince Castillo, PhD 7801909d27 a11y
Co-Authored-By: Vince Castillo, PhD <154394560+professorcastillo@users.noreply.github.com>
2026-07-27 01:43:58 -04:00
Timothy Jaeryang Baek 71c4da8c06 refac 2026-07-26 21:12:14 -04:00
Timothy Jaeryang Baek 0e0d08382a refac 2026-07-26 18:11:12 -04:00
Classic298 e3cce68ef2 fix: gate placeholder contrast fix behind High Contrast Mode (#27555)
Follow-up to #27496, reopened as a high contrast mode change.

Placeholder text is the lowest contrast text in the product. The grey scale in src/tailwind.css is achromatic oklch(L 0 0), so relative luminance is exactly L³, and placeholder:text-gray-300 is 1.58:1 on white against the 4.5:1 required by WCAG 1.4.3. The large text exemption does not apply, the largest of these is text-lg. Placeholders are frequently the only format hint a field gives, for example admin/Settings/General.svelte uses e.g.) "http://localhost:3000".

Rather than deleting the ~200 per-component placeholder utilities and rewriting the base rule, the remap now happens in two CSS rules that only apply when the existing High Contrast Mode setting is on, so the default theme is untouched:

- placeholders resolve to gray-600 (5.75:1) in light mode
- placeholders resolve to gray-500 (6.46:1) in dark mode

The rules sit in `@layer utilities` and are anchored on `input`/`textarea`, which puts them above both the base rule in src/tailwind.css and every per-component `placeholder:text-*` utility, so no call site has to change. Placeholders stay distinguishable from real input values, which are text-gray-700 (8.46:1) in light and dark:text-gray-300 (11.39:1) in dark.

The chat composer placeholder is a tiptap ::before, so neither the base rule nor any utility reaches it. It is hardcoded #676767, which is 5.66:1 in light but only 3.17:1 on the dark canvas, so only the dark side is remapped, to gray-500. That rule stays outside the layer because the rule it overrides is unlayered too.

The root layout toggles a `high-contrast` class on documentElement from `$settings.highContrastMode`, alongside the existing theme classes, so every route is covered and the class is removed again when the setting is turned off.

Verified in a browser against Tailwind's emitted rules and layer order, on inputs both with and without per-component placeholder utilities: with the setting on, placeholders resolve to gray-600 in light and gray-500 in dark, the composer placeholder resolves to gray-500 in dark even with the prefers-color-scheme override treated as unconditional, and with the setting off nothing changes in either theme. Also checked against the oled-dark theme (gray-500 on #000 is 7.57:1) and the dark:bg-white/[0.03] input surface (6.01:1).

Note: the `high-contrast` class toggle is the same hunk as in the muted text contrast branch. Whichever lands first, the other rebases cleanly by dropping it.
2026-07-26 18:02:57 -04:00
Classic298 585b704597 fix: clear token cookie on 401 auth redirect to stop login flash loop (#26751)
Since v0.10.0 a global fetch interceptor redirects to /auth and clears
localStorage.token whenever an authenticated backend request returns 401.
The OAuth callback cookie ("token", set with httponly=False so the
frontend can read it) is left behind. The auth page's oauthCallbackHandler
then immediately signs the user back in from that cookie and navigates to
"/", where the next 401 triggers the redirect again. The result is an
endless /auth and / ping-pong that renders as uncontrollable screen
flashing, and as a PWA stuck on a flashing splash screen when SvelteKit's
update check turns each navigation into a full page reload. Affected
users could only recover by clearing cookies, which matches the reports.

Clear the token cookie together with localStorage when redirecting, so
/auth stays on the login form and the user can sign in again normally.

Fixes #26731
2026-07-24 00:59:43 -05:00
Timothy Jaeryang Baek 49abfbdd15 refac 2026-07-23 13:18:04 -04:00
Timothy Jaeryang Baek d7f33996ee refac 2026-07-16 02:49:21 -04:00
Timothy Jaeryang Baek 29782aba01 refac 2026-07-15 16:26:40 -04:00
Timothy Jaeryang Baek 63ada24706 refac 2026-07-15 00:14:01 -04:00
Timothy Jaeryang Baek 6e14d0d627 refac 2026-07-14 01:39:40 -04:00
Timothy Jaeryang Baek 7088d245bb refac 2026-07-14 00:10:28 -04:00
Timothy Jaeryang Baek c98d8ecacc refac 2026-07-01 03:16:54 -05:00
Timothy Jaeryang Baek 56ee875e21 refac 2026-07-01 01:46:36 -05:00
Timothy Jaeryang Baek f6baa1bb77 refac 2026-06-29 14:34:22 -05:00
Timothy Jaeryang Baek f9c3ccd869 refac 2026-06-29 10:04:29 -05:00
Timothy Jaeryang Baek 5922727402 refac 2026-06-28 23:42:04 -05:00
Timothy Jaeryang Baek 516051304e refac 2026-06-28 22:33:59 -05:00
Timothy Jaeryang Baek 8934bfb04b refac 2026-06-24 14:13:58 +02:00
G30 966b3fdb57 fix(ui): deduplicate layout-level API requests (#25942) 2026-06-17 00:09:50 +02:00
Timothy Jaeryang Baek 38920c0ed1 refac 2026-06-15 23:32:06 +02:00
Timothy Jaeryang Baek 77c8c54b1e refac 2026-06-01 13:53:19 -07:00
G30 ceb1cbc009 fix(ui): guard JSON.parse(localStorage) calls with try/catch to prevent UI crashes (#25481) 2026-06-01 10:33:54 -07:00
Timothy Jaeryang Baek 552bbcecfa refac 2026-05-09 03:15:53 +09:00
Timothy Jaeryang Baek 4fe2de7864 refac 2026-05-09 01:13:16 +09:00
Timothy Jaeryang Baek 8ff7ff459b chore: format 2026-04-24 18:48:21 +09:00
Timothy Jaeryang Baek 3e14524154 refac 2026-04-24 16:39:44 +09:00
Timothy Jaeryang Baek 1824e69a70 refac 2026-04-20 09:33:10 +09:00
Timothy Jaeryang Baek dc6df52a91 refac 2026-04-20 09:11:38 +09:00
Timothy Jaeryang Baek e5b5a17426 refac 2026-04-19 23:38:58 +09:00
Timothy Jaeryang Baek a4d62253df refac 2026-04-18 06:23:50 +09:00
Timothy Jaeryang Baek 25898116ea chore: format 2026-04-12 18:12:59 -05:00
Timothy Jaeryang Baek aacf95cf76 refac 2026-04-11 16:08:16 -06:00
Timothy Jaeryang Baek be38ca8e81 refac 2026-04-11 14:44:05 -06:00
Timothy Jaeryang Baek 1dcbfd47fb refac 2026-04-09 11:36:06 -07:00
Timothy Jaeryang Baek 4b8e331333 refac 2026-04-09 11:13:09 -07:00
Timothy Jaeryang Baek 9f1b279e88 refac 2026-04-07 15:04:57 -06:00
Timothy Jaeryang Baek 8e82f0d239 refac 2026-04-07 14:30:05 -06:00
Timothy Jaeryang Baek a06685a47b refac 2026-03-29 21:01:10 -05:00
Timothy Jaeryang Baek 24370d5c40 refac 2026-03-24 05:21:42 -05:00
Timothy Jaeryang Baek c53cd78dcb refac 2026-03-19 18:06:43 -05:00
Timothy Jaeryang Baek 694fb3776f refac 2026-03-19 17:56:05 -05:00
Timothy Jaeryang Baek ce0ca894fe enh: code interpreter pyodide fs 2026-03-07 19:23:18 -06:00
Classic298 391a4878e6 perf: replace JSON.parse(JSON.stringify()) with structuredClone in layout (#22104)
Replace JSON roundtrip with native structuredClone for tool execution result cloning. Also remove unnecessary JSON roundtrip on a static error object literal that is already a fresh value.
2026-03-01 13:36:16 -05:00
Timothy Jaeryang Baek ddedceb7ad refac 2026-03-01 12:32:44 -06:00