refactor(web): dashboard typography & contrast pass (salvage #28832 + sanitize follow-up)#30714
Merged
Conversation
Removes the global `uppercase` + `font-mondwest` from the App.tsx root
that forced every page to opt-out, replaces stacked-alpha text colors
with semantic tokens for WCAG-AA contrast across all 7 themes, and
applies the new `text-display` utility from @nous-research/ui@0.16.0
on intentional brand chrome (page titles, sidebar headings, segmented
filters) only. Bumps every sub-12px arbitrary text size to text-xs.
Also widens the dashboard plugin routes (/api/dashboard/agent-plugins/
{name:path}/...) so category-namespaced plugins like observability/
langfuse and image_gen/openai can be enable/disabled from the dashboard
— previously the FE encodeURIComponent-ed the slash and the backend
{name} route rejected it. _validate_plugin_name still blocks .. and
backslash, and strips leading/trailing slash.
Touches sessions/env/keys page chrome and adds two new i18n keys
(`overview`, `showMore`/`showLess`) across all 18 locales.
Squashes 19 commits from PR #28832.
Co-authored-by: Hermes <noreply@nousresearch.com>
Follow-up to PR #28832 — the dashboard plugin routes now accept slashed names like `observability/langfuse` and `image_gen/openai`, but `_sanitize_plugin_name` still rejected forward slash and so dashboard update + remove on those plugins fell through to '404 not found' even though they exist on disk. Adds an opt-in `allow_subdir=True` flag that: - Permits internal forward slashes (category-namespaced plugin keys emitted by `_discover_all_plugins`). - Strips leading and trailing slashes. - Still rejects `..` and backslash, and still asserts the resolved target lives inside `plugins_dir`. Opted in at the two read-paths that operate on installed plugins: `_require_installed_plugin` (CLI update/remove) and `_user_installed_plugin_dir` (dashboard update/remove). The install path keeps the default (`allow_subdir=False`) because freshly-cloned plugins always land top-level under `~/.hermes/plugins/<name>/`. Adds 6 targeted unit tests covering the new flag's allow/reject matrix.
Contributor
🔎 Lint report:
|
19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Salvages PR #28832 onto current
mainplus a small follow-up so the new slashed plugin routes actually work end-to-end.What's in this PR
Commit 1 — refactor(web): dashboard typography & contrast pass (Austin Pickett, squashed)
Squashes all 19 commits from #28832. Original authorship preserved via
--author=.uppercase+font-mondwestfrom the App.tsx root.text-displayfrom@nous-research/ui@0.16.0on intentional brand chrome (page titles, sidebar headings, segmented filters) so the brand-uppercase look is opt-in per element rather than global.text-muted-foreground/60,opacity-30on nav headers, etc.) with semantic text tokens (text-text-primary/secondary/tertiary/disabled) so contrast stays WCAG-AA across all 7 built-in themes.text-xswhere it was actual content.--color-muted-foreground→--color-text-secondaryinindex.cssso existing call sites land on the new contrast floor without per-file changes.@nous-research/ui0.14.0→0.16.0, regeneratesweb/package-lock.json, refreshesnix/web.nixfetchNpmDepshash.web/README.md.Beyond the original typography pass, the PR also picked up:
hermes_cli/web_server.py— widens the 5 dashboard plugin routes to{name:path}and relaxes_validate_plugin_name(still rejects..and\, strips leading/trailing/, allows internal/). Enables enable/disable on category-namespaced plugin keys likeobservability/langfuseandimage_gen/openaithat the FE wasencodeURIComponent-ing.web/src/lib/api.ts— adds apluginPath()helper that preserves/segments when building the URL.overview,showMore/showLess) across all 18 locales.Commit 2 — fix(plugins): widen
_sanitize_plugin_namefor category-namespaced namesThe dashboard plugin routes in commit 1 accept slashed names, but
_sanitize_plugin_name(the deeper guard used by update/remove on installed plugins) still rejected forward slash. So dashboard update/remove on a slashed plugin returned "not found" even though the directory existed.allow_subdir=Trueflag that permits internal/and strips leading/trailing/, while still rejecting..and\and still asserting the resolved target lives insideplugins_dir._require_installed_pluginfor CLIupdate/remove,_user_installed_plugin_dirfor the dashboard equivalents).allow_subdir=False— freshly cloned plugins always land top-level under~/.hermes/plugins/<name>/.Validation
scripts/run_tests.sh tests/hermes_cli/test_plugins_cmd.py— 71/71 passed (65 existing + 6 new).HERMES_HOMEand a real~/.hermes/plugins/observability/langfuse/checkout:_sanitize_plugin_name(..., allow_subdir=True)resolves slashed name to the correct path.allow_subdir=False) still rejects slash._user_installed_plugin_dir("observability/langfuse")returns the dir;dashboard_remove_user_plugin("observability/langfuse")succeeds and removes the directory...,\\,foo/../../etcall still rejected withallow_subdir=True.plugins_dir.Closes
Closes #28832 (squash-merged here with Austin's authorship preserved on commit 1).
Infographic