Commit Graph
1068 Commits
Author SHA1 Message Date
DrSmoothl 65e819d96e feat(onebot): expose stranger profile signatures
Return the NapCat-compatible long_nick field from get_stranger_info for both freshly fetched and cached user profiles. Keep the field present as an empty string when profile data is unavailable so callers receive a stable response shape.

Document the response contract in the Action schema and generated MCP catalog, and cover fetched, cached, and empty fallback paths with regression tests. This change reuses the existing profile signature value and does not add QQ requests or alter protocol packets.

Closes #246
2026-07-19 17:26:59 +08:00
DrSmoothl 3c2a402b8a test(bridge): make pipe-close regression deterministic
Replace the Unix socket servers with an in-memory Duplex transport so the mid-send close regression runs in restricted environments and on Windows.

Wait until the control write begins before closing the transport, assert the exact close error, and use an event-loop boundary to detect leaked promise rejections without timing sleeps.

This keeps the test on the public QqHookClient send path while removing unrelated OS socket setup and does not change production behavior.
2026-07-19 16:52:45 +08:00
DrSmoothl 78101b3512 fix(core): send group album pagination cursors
Encode the opaque media-list cursor in the protobuf page-info field while leaving the reserved field empty. This restores subsequent-page requests without changing the OneBot action or response shape.

Add an independent wire oracle so future protocol definition drift cannot make the encoder regression test pass against itself.

Fixes #245
2026-07-19 16:28:01 +08:00
DrSmoothl 613b2b1e68 fix(proton): decode extended uint32 field varints
Consume complete well-formed value varints before retaining their low 32 bits, matching QQ push behavior without relaxing tag or length parsing.

Add generator and end-to-end group reaction regressions, including truncated and malformed varint coverage. Refs #242.
2026-07-19 15:35:53 +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 5fe6b31eb6 refactor(ci): generalize native smoke tests
Replace the feature-specific MP3 verification command with a workspace-wide native test entry point.

Keep native regression cases in package-owned test suites so future checks can expand without adding workflow steps.
2026-07-17 18:27:30 +08:00
DrSmoothl b3838d204f fix(protocol): produce valid MP3 records
Use the dedicated audio conversion path for record output so mono QQ voice records produce valid MP3 data.

Add release-target smoke coverage and preserve conversion and cleanup failures for diagnostics.

Fixes #239
2026-07-17 18:17:48 +08:00
DrSmoothl 1568942ae6 feat(api): publish message history direction
Expose reverse_order in the SDK request types and regenerate the MCP action catalog for group and private message history.

Describe the anchored older-or-newer semantics and retain true as the backward-compatible default for existing clients.

Refs #229
2026-07-17 17:45:35 +08:00
DrSmoothl fadc7ce316 feat(onebot): expose bidirectional message history
Add reverse_order to group and private history actions, preserve latest-page behavior without an anchor, and keep local fallback results chronologically ordered.

Key self-sent private messages and reply targets by the conversation peer, reject cross-conversation anchors, and include request context when a server fetch falls back to local history.

Refs #229
2026-07-17 17:45:30 +08:00
DrSmoothl afa4ccc5e0 feat(core): add bidirectional history pagination
Walk bounded QQ history windows in either direction while keeping all returned messages in chronological order.

Resolve short-capped forward ranges without skipping messages nearest the anchor, share the existing request throttle across group and private history, and surface incomplete fetches instead of returning silent partial results.

Refs #229
2026-07-17 17:45:03 +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 c2d028af2e fix(protocol): preserve member operation high bits
Clear only the membership flag bit when normalizing group increase operation codes so unrelated high bits cannot collapse into the invitation value.

Add regression coverage for extended operation codes.
2026-07-16 20:17:38 +08:00
DrSmoothl 0e3bbc6906 fix(protocol): correct group membership notices
Derive group increase approval and invitation subtypes from the member-change operation code instead of actor identity.

Treat voluntary leave field 5 as structured metadata and attribute the operation to the departing member so valid notices are not discarded.

Add protocol and OneBot regression coverage for issue #237.
2026-07-16 19:41:48 +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 b4f5e9b71b fix(media): support base64 data URLs for uploads
Parse RFC 2397 base64 data URLs through the shared binary source classifier so inline media cannot fall through to local file handling.

Reuse the same parsing path for buffered and disk-staged uploads, reject malformed or oversized inputs explicitly, and add regression coverage for both paths.

Refs #236
2026-07-16 10:05:56 +08:00
DrSmoothl ebd02c3f3d chore(release): v1.12.3 2026-07-15 21:31:59 +08:00
DrSmoothl 6492500158 fix(core): handle omitted group album success codes
Treat an absent media-list return code as the protobuf zero default while preserving failures for explicit non-zero codes.

Add a regression test that exercises the encoded response path with media data and no status field.

Refs #234
2026-07-15 17:30:29 +08:00
DrSmoothl 9c61d991bd feat(onebot): report stalled receive health
Separate account login state from receive-path health in get_status. A logged-in account remains online while good becomes false only after the receive path has been confirmed stale.

Apply the same health value to OneBot lifecycle and heartbeat events so API polling and event consumers observe consistent status semantics.

Regenerate the MCP action catalog with the clarified contract and add regression coverage for the online-but-degraded response.

Refs #233.
2026-07-15 16:48:02 +08:00
DrSmoothl da26d6796f feat(core): aggregate receive health by account
Track receive health for every process attached to an account while treating unarmed monitoring as compatible rather than degraded.

Report the account as healthy while any attached process remains healthy, and mark it degraded only after every attached process has been confirmed stale. Keep health ownership synchronized with process attach, migration, and detach transitions.

Fail fast when process ownership and health state diverge instead of silently presenting a healthy status. Add multi-process regression coverage for partial degradation, full degradation, and recovery.

Refs #233.
2026-07-15 16:47:26 +08:00
DrSmoothl e8cb49ced9 feat(bridge): detect stalled receive paths
Arm receive monitoring only after an existing QQ heartbeat has been observed, preserving compatibility with sessions that do not expose the signal.

Require 90 seconds of receive silence plus a 15-second confirmation window before reporting degradation. Any later inbound frame refreshes or restores health, including non-routable frames that still prove the receive path is alive.

Bind watchdog state to the active account epoch so direct login switches and packet-driven account migration cannot inherit stale deadlines from a previous account.

Forward health transitions to the bridge layer without reconnecting, reinjecting, or otherwise changing session recovery behavior. Add regression coverage for arming, recovery, sleep-resume confirmation, account migration, and invalid-UIN frames.

Refs #233.
2026-07-15 16:46:16 +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 ccbee78cc7 feat(core): execute config restores as a transaction
Move restore execution into a dedicated module with explicit preflight, snapshot, stage, commit, rollback, and cleanup phases. Keep live files untouched until staging completes, roll back partial commits, and retain the transaction directory when rollback or cleanup cannot finish.

Report the transaction ID, active phase, failed files, commit state, rollback result, and recovery path without logging configuration contents. Cover every filesystem boundary with a focused fault matrix, including unreadable current files and cleanup failures.
2026-07-15 16:12:03 +08:00
DrSmoothl 2fea3ca4d9 feat(core): validate backup restores before mutation
Route selected backup entries through owner-owned config parsers before any filesystem write. Reject unsupported paths, mismatched encodings, malformed base64, lossy normalization, invalid effective overlays, and decoded payloads larger than 32 MiB.

Treat WebUI state, private keys, and every OneBot config as a single sensitive group. Skip unselected sensitive entries without inspecting their contents, preserve recognized migrations, and assign restrictive modes to credential files.
2026-07-15 16:11:44 +08:00
DrSmoothl f9d251d1fa fix(protocol): decode group member operators correctly
Handle member joins and ordinary removals using their direct operator identity while preserving the special nested form used when the bot is removed.

Reject malformed values with bounded diagnostic context and add regression coverage for #228 and related member-decrease events.
2026-07-14 20:08:29 +08:00
DrSmoothl a3467a8d89 chore(release): v1.12.2 2026-07-14 07:57:08 +08:00
DrSmoothl 21431e525d docs(mcp): refresh group notice action schema
Regenerate the MCP catalog from the OneBot action definitions. Document the new parameters, defaults, validation invariants, and merged notice readback.
2026-07-14 03:39:58 +08:00
DrSmoothl 9e60de32fe feat(sdk): expose group announcement controls
Add typed client options for pinned, popup, new-member, edit-card, and confirmation behavior. Return typed notice metadata and cover the HTTP parameter mapping.
2026-07-14 03:39:41 +08:00
DrSmoothl 5885187e7d test(group-notice): cover publishing options and readback
Verify endpoint selection, option validation, image metadata parsing, response merging, and OneBot forwarding. Cover the type-20 new-member path and fail-fast conflict behavior.
2026-07-14 03:39:27 +08:00
DrSmoothl 51eb1f733d feat(group-notice): support advanced announcement controls
Route regular and new-member announcements through their correct web endpoints. Validate option conflicts, preserve existing defaults, merge returned notice collections, and surface transport and upload failures.
2026-07-14 03:39:11 +08:00
DrSmoothl 216213e102 ci(release): redesign cross-platform release notes
Present Windows x64, Linux x64, and Linux arm64 as fully supported release targets in a concise download matrix.

Add quick-start and unattended-consent guidance, link commits and version comparisons, and filter merge and release housekeeping from the change list.

Refresh the adjacent packaging documentation so it matches current platform support.
2026-07-13 23:15:20 +08:00
DrSmoothl 74939da3d7 feat(webui): support environment agreement consent
Allow unattended deployments to accept the EULA and Privacy Notice through SNOWLUMA_ACCEPT_EULA and SNOWLUMA_ACCEPT_PRIVACY.

Require both values, reject invalid configuration, keep environment consent non-persistent, and log whether acceptance is complete or partial.

Document the deployment contract and add regression coverage for parsing, persistence isolation, and stored-consent compatibility.
2026-07-13 23:15:10 +08:00