Commit Graph
187 Commits
Author SHA1 Message Date
DrSmoothl 655226d9d7 fix(logging): harden file level configuration
Make persisted log filtering predictable across supported startup settings while rejecting configurations that could silently retain more data than intended.

Keep the first WebUI login credential available without weakening normal log thresholds, clarify the operator-facing behavior, and strengthen regression coverage across isolated environments and explicit file-output disablement.
2026-07-30 10:27:43 +08:00
Werewolf-Wu 227a62f2ad feat(common): configure file log level
Allow operators to control how much diagnostic information is retained in file logs independently from live console output.

Document the new startup setting and add regression coverage for its default behavior, runtime independence, and unsupported configurations.
2026-07-30 10:04:52 +08:00
DrSmoothl e5f256f4dc feat(webui): report account storage update progress
Surface account storage preparation and background history progress through the existing live connection status channel. Clearly distinguish unavailable accounts from accounts that remain fully usable during maintenance.

Show processed totals, completion percentage, estimated remaining time, and retry states in both the global notice and account overview. Preserve existing connection update filtering to avoid unnecessary refreshes.
2026-07-30 09:57:31 +08:00
DrSmoothl 04cbb8cbf3 fix(webui): recover stalled requests 2026-07-29 02:15:30 +08:00
DrSmoothl df3f8c5587 chore(release): v1.12.10 2026-07-26 19:29:28 +08:00
DrSmoothl b5e10fefc2 feat(webui): configure login history backfill
Expose the per-account login history backfill switch in General settings and keep missing or legacy configuration disabled by default.

Document that changes apply on the next login, historical messages are stored locally without event replay or read-state changes, and fixed safety limits govern roster scanning, selected sessions, page size, request spacing, and retries.

Add WebUI normalization coverage so the optional setting survives save and restore without silently inheriting an enabled value. Refs #280.
2026-07-25 23:44:54 +08:00
DrSmoothl 3a7253315f feat(onebot): share HTTP listeners with WebSocket clients
Add an opt-in HTTP server setting that accepts OneBot WebSocket connections on the same port and access token while preserving standalone WebSocket server configurations.

Reuse the existing connection lifecycle for authentication, roles, events, heartbeat, streaming actions, token rotation, and shutdown. Expose the switch in WebUI and persist it through strict configuration validation and restore paths.

Refs: #281
2026-07-25 20:40:43 +08:00
DrSmoothl c64f9d3078 chore(release): v1.12.9 2026-07-24 14:15:51 +08:00
DrSmoothl 87a604ecbd feat(storage): add managed storage controls
Enforce a global log quota with configurable retention and observable degradation. Add authenticated storage reporting and safe cleanup controls to the settings UI. Protect active stream transfers and isolate parallel test resources.
2026-07-24 12:58:57 +08:00
DrSmoothl 97ab8dc393 chore(release): v1.12.8 2026-07-22 20:03:54 +08:00
DrSmoothl 7fb8aa1d42 fix(webui): keep node dialog actions visible
Separate the node editor into fixed header and footer rows with an independently scrollable form body, so short viewports cannot push the save action out of reach.
2026-07-22 00:02:48 +08:00
DrSmoothl 88216ce644 chore(release): v1.12.7 2026-07-20 15:52:49 +08:00
DrSmoothl 4e62fdc80b chore(release): v1.12.6 2026-07-19 19:38:13 +08:00
DrSmoothl 4520687fbe docs(webui): clarify custom pointer default
State in the appearance settings that the custom cursor and context-menu system is disabled by default.
2026-07-19 19:37:49 +08:00
DrSmoothl a9b8440731 fix(webui): disable custom pointer system by default
Default new and legacy-normalized appearance configs to native cursor and context-menu behavior while preserving explicit opt-in settings.
2026-07-19 19:33:26 +08:00
DrSmoothl 87bab6666b fix(webui): preserve dashboard widget settings
Keep per-widget configuration when persisted overview layouts are migrated against the current widget catalogue. Account shortcuts, notes, links, filters, and other configurable widgets now retain their saved values after a page reload.

Add a WebUI Vitest entry point and regression coverage for restoring an account widget with saved configuration.

Fixes #243.
2026-07-19 15:26:22 +08:00
DrSmoothl 605b5d1104 feat(webui): expose custom pointer controls
Add a single appearance setting for SnowLuma's adaptive cursor and custom context menu, enabled by default for existing and new installations.

Turning the setting off immediately removes both interaction layers and restores the browser's native cursor and context menu. The preference remains synchronized through the existing server-backed appearance configuration.
2026-07-18 23:39:06 +08:00
DrSmoothl d40c803ed9 feat(webui): add adaptive pointer interactions
Introduce a CSS-driven adaptive cursor that morphs for controls, text editing, dragging, resizing, busy states, and other native pointer semantics on desktop devices.

Add a themed context menu for editing, selections, links, images, and page navigation while preserving explicit native-menu escape paths. Store a default-on interaction preference through the normalized appearance model and cover its migration and opt-out behavior.
2026-07-18 23:38:43 +08:00
DrSmoothl c15625dbd8 feat(webui): add spring-based range sliders
Replace native range inputs with an accessible Radix-backed control that preserves keyboard and assistive-technology semantics.

Reproduce the elastic handle, track stretch, tick visibility, and reduced-motion behavior while keeping SnowLuma theme tokens. Adopt the component for interface scale and background image controls.
2026-07-18 23:38:00 +08:00
DrSmoothl 4391b45c41 chore(release): v1.12.5 2026-07-17 18:47:51 +08:00
DrSmoothl 08ec771234 fix(webui): restore clear responsive debug tabs
Replace the floating capsule treatment with a compact section-navigation rail that combines primary text, a restrained active tint, and a short underline for an unambiguous selected state.

Constrain the shared horizontal viewport so narrow screens scroll only inside the tab strip rather than widening the page. Existing keyboard navigation, focus handling, active-tab reveal, and reduced-motion behavior remain intact.
2026-07-16 22:35:32 +08:00
DrSmoothl bdb4fce8b8 style(webui): optically align directional icons
Introduce reusable one-pixel optical offsets for asymmetric forward and back glyphs without changing control boxes, spacing, or pointer hit areas.

Apply the correction consistently to navigation arrows, play controls, send actions, and the account sidebar so directional symbols appear centered across shared controls. No interaction or navigation behavior changes.
2026-07-16 22:35:17 +08:00
DrSmoothl 9f212d2f19 style(webui): refine shared surface depth
Add theme-neutral media keylines and layered card shadows so avatars, previews, pickers, and shared cards remain separated without relying on hard borders.

Keep the message composer radius hierarchy concentric across appearance settings and remove redundant nested canvas surfaces from forwarded-message editors. This changes visual presentation only; message composition behavior and emitted payloads remain unchanged.
2026-07-16 22:34:47 +08:00
DrSmoothl 9bdc6510bd fix(webui): clarify compact text hierarchy
Replace 145 scattered 10px and 11px declarations with semantic text roles across the dashboard, configuration, diagnostics, logs, and settings surfaces.

Promote instructions, errors, interactive labels, and empty states to at least 12px, raise security-sensitive and destructive warnings to 14px, and make general-purpose badges readable by default. Keep compact sizing only for dense technical metadata such as timestamps, identifiers, paths, versions, and counters.

Preserve the existing desktop density while improving Chinese text legibility and responsive behavior on narrow mobile layouts.
2026-07-16 21:46:15 +08:00
DrSmoothl 5e0cbb026b refactor(webui): establish offline typography foundations
Remove runtime requests to external font services and make the default sans and monospace stacks rely entirely on locally available platform fonts.

Introduce explicit metadata and micro text tokens for dense technical content, disable synthetic font faces globally, and update the appearance selector so every bundled font choice accurately describes its local source.
2026-07-16 21:45:57 +08:00
DrSmoothl 6a1042e33f chore(release): v1.12.4 2026-07-16 20:29:00 +08:00
DrSmoothl 0503af2fcc fix(webui): export logs without terminal control codes
Keep terminal styling confined to interactive console output while storing plain structured log lines for subscribers and file persistence.

Sanitize downloads again at the WebUI boundary so cached legacy entries and fallback-formatted records cannot leak CSI, OSC, DCS, or C1 control sequences. Add regression coverage for colored output, hyperlinks, control strings, malformed sequences, and preserved multiline text.
2026-07-16 19:20:48 +08:00
DrSmoothl f581fab396 fix(webui): skip initial route entrance motion
Prevent the top-bar title and main route content from animating during the first authenticated render. This removes first-load flashing while preserving the existing transitions for subsequent navigation.
2026-07-16 16:06:12 +08:00
DrSmoothl e224a0c6ea feat(webui): animate contextual state icons
Add a shared, stable-size password visibility icon that switches with interruptible opacity, scale, and blur motion across login and password-change flows.

Apply the same motion language to password rule checks, remove the redundant outer pulse, skip initial-state animation, and switch immediately when reduced motion is enabled.
2026-07-16 16:06:04 +08:00
DrSmoothl cd0466a7e3 perf(webui): scope interactive motion
Replace broad transitions with property-specific animation for progress bars, filters, cards, and dashboard controls. This prevents unrelated layout properties from animating while preserving the existing visual feedback.

Standardize standalone press feedback at a 0.96 scale, keep disabled controls static, and honor both operating-system and in-app reduced-motion preferences.
2026-07-16 16:05:52 +08:00
DrSmoothl cce9ab07eb feat(webui): reveal complete overview values
Add a visible disclosure control for truncated host and runtime statistics while keeping the compact dashboard card layout unchanged.

Support hover, focus, mouse click, touch toggle, outside dismissal, and Escape, with direct accessible descriptions for assistive technology.
2026-07-16 15:36:21 +08:00
DrSmoothl bfd00a14db fix(webui): restore debug heading hierarchy
Keep the top bar as the page's single primary heading and rename the content section to Developer Tools at the secondary level.

This removes duplicate page titles for screen readers while preserving the existing debug layout and feature grouping.
2026-07-16 15:36:09 +08:00
DrSmoothl 5a64acd807 feat(webui): improve overflowing tab navigation
Add edge fades and automatic active-tab reveal to shared horizontal tab lists, including revalidation when asynchronous labels or badges change width.

Give configuration tabs complete tab and panel semantics, keyboard navigation, focus treatment, and 40px desktop or 44px mobile targets without changing their visual hierarchy.
2026-07-16 15:35:59 +08:00
DrSmoothl 897f55c88b fix(webui): keep modal controls accessible
Increase shared dialog and sheet close targets to 40px on desktop and 44px on mobile while preserving the compact 16px icon.

Constrain dialogs to the viewport and scroll their body inside a fixed shell so long forms never move the close control off-screen.
2026-07-16 15:35:50 +08:00
DrSmoothl 9e34ebc0d4 fix(webui): harden responsive top bar layout
Rebalance the mobile top bar so the page title can shrink independently while navigation and account actions keep stable touch targets.

Align status and description visibility with the actual desktop breakpoint, hide only decorative content on narrow screens, and retain kiosk access on common phone widths without horizontal overflow.

Add explicit title context for truncated labels and preserve the existing desktop density.
2026-07-16 14:57:00 +08:00
DrSmoothl e842f6128b feat(webui): refine mobile theme controls
Give every theme option a reliable 44-pixel touch target on mobile while retaining the denser desktop presentation.

Adjust the active indicator to preserve visual balance at both sizes and add tactile press feedback that follows the application's reduced-motion settings.
2026-07-16 14:56:40 +08:00
DrSmoothl a4bf838bfd feat(webui): improve shared control ergonomics
Raise shared button and form-control defaults to provide clearer, more consistent interaction targets across the interface.

Guarantee 44-pixel touch targets and 16-pixel form text on narrow screens, preserve explicit desktop size overrides, and prevent mobile browser focus zoom.

Replace broad transitions with targeted press feedback, respect reduced-motion preferences, and allow callers to opt out without overriding their persistent transforms.
2026-07-16 14:56:30 +08:00
DrSmoothl ebd02c3f3d chore(release): v1.12.3 2026-07-15 21:31:59 +08:00
DrSmoothl bd9236e3fa feat(webui): expose transactional backup restore
Replace route-local restore writes with the core transaction and map preflight, rollback, and post-commit cleanup failures to precise HTTP responses. Treat only ENOENT as a missing export file and return transaction, restored, skipped, migrated, and restart facts.

Update the settings panel to describe the full sensitive configuration group, avoid restart guidance for empty plans, and reload settings after both successful and failed imports so the UI reflects committed disk state. Add HTTP regression coverage for export and restore error semantics.
2026-07-15 16:12:51 +08:00
DrSmoothl a3467a8d89 chore(release): v1.12.2 2026-07-14 07:57:08 +08:00
DrSmoothl c04864dd21 chore(release): v1.12.1 2026-07-10 14:00:40 +08:00
DrSmoothl a67c95407e feat(webui): show saved and applied config state
Surface whether a OneBot configuration was persisted, applied live, or left degraded. Keep failed adapters and apply errors visible in the config and overview pages instead of reporting a false success.
2026-07-10 13:49:49 +08:00
DrSmoothl 90f65654c7 feat(webui): animate log rows — entrance + scroll edge fade (#185)
Give the virtualized log viewer motion without hurting readability or choking at
high rate. A genuinely new tail line fades and rises in (200ms, ease-out-expo);
detection lives in the SSE flush (real arrivals only), is bounded by a 260ms
timer, and never replays when an old row scrolls back into view or when a filter
toggles. A firehose batch (more than 4 new lines in one flush) suppresses the
per-row entrance so a 100 line/s stream never strobes — the scroll flow and edge
fade carry it instead.

Scrolling gets a soft, scroll-position-aware edge fade: a boundary dissolves only
when there is actually hidden content past it (a ResizeObserver + scroll listener
keep it in sync), so a fully-scrolled top/bottom row is never dimmed. The entrance
animation lives on an inner element so it never collides with the virtual row's
own translateY positioning or perturbs measureElement. All of it is gated on the
motion switches: the entrance on reduce/disable-motion, the static edge fade on
the hard 关闭全部动效 only.
2026-07-07 23:27:46 +08:00
DrSmoothl b6fb5bd530 chore(release): v1.12.0 2026-07-07 22:38:02 +08:00
DrSmoothl cd04271b69 fix(webui): confirm before loading from the process-probe dialog
The 加载 button added in #189 injected directly, unlike the process-list
load which routes through the confirm dialog. Fire the same
setConfirm({kind:'load'}) flow so both entry points share one
confirmation step.
2026-07-07 22:36:19 +08:00
Airline233 9914db69e6 feat(webui): add load button to process probe dialog (#189) 2026-07-07 22:34:55 +08:00
DrSmoothl fc424ab740 perf(webui): stop login-waves rAF under reduced-motion; gate deliveries poll on visibility (#185)
login-waves ran its requestAnimationFrame loop unconditionally, ignoring
reduced-motion. Honour it (OS `prefers-reduced-motion` or the app's
`data-reduce-motion`): when reduced, paint a single static frame and never start
the loop; otherwise animate. React live to OS preference changes, and repaint the
static frame on resize while reduced so the field doesn't blank out. The loop is
torn down on unmount as before.

deliveries-widget polled /api/notifications/recent every 15s regardless of tab
visibility. Skip the poll while `document.hidden`, refresh immediately on
becoming visible, and add an in-flight guard so a slow request can't stack
overlapping polls.
2026-07-07 22:34:07 +08:00
DrSmoothl d984833914 perf(webui): share one ref-counted /api/logs/stream across subscribers (#185)
The log viewer and each dashboard "recent alerts" widget opened their own
EventSource to /api/logs/stream, so N alert tiles + the viewer meant N+1
identical connections (plus a short-lived-connection churn on navigation). Make
openLogStream ref-counted: the first subscriber opens a single shared stream,
every frame and status change fans out to all subscribers (each isolated with
try/catch and re-checked against the live Set so a mid-frame unsubscribe is
skipped), and the last to leave closes it. Late subscribers replay the current
status.

Hardening: a no-token open no longer caches a dead disposer (it would have
blocked every later subscriber from ever connecting); the shared URL bakes in the
token, so setToken() tears down and reopens on any token change (re-login would
otherwise retry a stale-token URL forever); the connecting window seeds
'reconnecting' so a late joiner's badge isn't wrongly 'closed'. Consumers are
unchanged — the dedup is transparent behind api.logs.stream.
2026-07-07 22:29:10 +08:00
DrSmoothl c49a5a0aa8 perf(webui): make debug feed pause truly close the SSE (#185)
The live-activity feed kept its /api/debug/stream EventSource open while paused
and merely dropped frames in the handler, so a paused feed still held a backend
connection slot and processed every event for nothing. Make `paused` a
dependency of the subscription effect: pausing now closes the stream and
resuming reopens it. Events during a pause were already discarded, and the row
buffer is preserved across toggles, so the only change is that a paused feed
stops consuming.

Deliberately NOT gated on tab visibility: debug-page keeps this component mounted
across tabs on purpose (the comment there notes actions fired from other tabs
must still land in the feed), so closing on tab switch would regress that. Only
an explicit pause severs the connection. StatusPill gained a `paused` state so a
deliberate pause reads as 已暂停 rather than 未连接.
2026-07-07 22:17:16 +08:00
DrSmoothl 4802dfe7aa perf(webui): virtualize the log viewer row list (#185)
The logs page rendered every filtered row, so a full 2000-line view mounted
~10k DOM nodes and cost ~66ms of layout per commit. Switch to a virtualized
list (@tanstack/react-virtual) that mounts only the visible window plus a small
overscan — a few dozen nodes regardless of how many lines the view holds.

Rows are dynamically measured (measureElement) so wrap mode's variable-height
lines need no fixed row-height assumption; the size cache is keyed by row id so
the maxLines front-drop doesn't mis-attribute heights across the index shift.
The column header moved just outside the scroll viewport so the virtual list is
the sole scroll content (no sticky-offset math). Auto-scroll now follows the
tail via scrollToIndex with a next-frame re-pin (freshly-appended rows carry the
size estimate until measured, which otherwise left wrap-mode tails short), and
re-runs on filter/level/wrap/maxLines changes, not just new logs. ScrollArea
gained an optional viewportRef so the virtualizer can drive off the real Radix
scroll element. The per-row entrance fade is dropped (rows mount/unmount on
scroll); divide-y became a per-row border.
2026-07-07 22:07:02 +08:00