feat(webui): simplify automation management and unify disclosure motion
Replace the dense automation workspace with a calm list and on-demand details, show current linked-chat titles, and remember manual system-task expansion preferences. Reuse disclosure transitions across expandable controls, preserve drafts and focus through closing, and release large diffs after their exit animation. Refs NAN-116
This commit is contained in:
1 parent
90b889394f
commit
1640784d45
37 files changed
+1746
-721
No files matched your search
@@ -18,6 +18,7 @@ import {
|
||||
ChannelLogo,
|
||||
} from "@/components/settings/channels/ChannelIdentity";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { DisclosureContent } from "@/components/ui/disclosure";
|
||||
import { normalizeLocale } from "@/i18n/config";
|
||||
import { configureChannel } from "@/lib/api";
|
||||
import type {
|
||||
@@ -293,7 +294,7 @@ export function WeixinPanel({
|
||||
) : null}
|
||||
|
||||
{advancedFields.length ? (
|
||||
<div id={advancedPanelId} hidden={!advancedOpen} className="text-[12px] leading-5 text-muted-foreground">
|
||||
<DisclosureContent id={advancedPanelId} open={advancedOpen} className="text-[12px] leading-5 text-muted-foreground">
|
||||
<CredentialForm
|
||||
fields={advancedFields}
|
||||
values={fieldValues}
|
||||
@@ -305,7 +306,7 @@ export function WeixinPanel({
|
||||
}}
|
||||
compact
|
||||
/>
|
||||
</div>
|
||||
</DisclosureContent>
|
||||
) : null}
|
||||
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,10 @@ from typing import Any, Protocol, cast
|
||||
|
||||
from nanobot.cron.types import CronJob
|
||||
from nanobot.session.history_visibility import is_hidden_history_message
|
||||
from nanobot.session.manager import _message_preview_text # pyright: ignore[reportPrivateUsage]
|
||||
from nanobot.session.manager import (
|
||||
_message_preview_text, # pyright: ignore[reportPrivateUsage]
|
||||
_metadata_title, # pyright: ignore[reportPrivateUsage]
|
||||
)
|
||||
from nanobot.triggers.local_types import LocalTrigger
|
||||
|
||||
AutomationJob = CronJob | LocalTrigger
|
||||
@@ -309,7 +312,7 @@ def _websocket_origin_payload(
|
||||
if session_manager is not None:
|
||||
data = session_manager.read_session_file(session_key)
|
||||
if isinstance(data, dict):
|
||||
title = str(data.get("title") or "")
|
||||
title = _metadata_title(data.get("metadata"))
|
||||
preview = _session_preview(data.get("messages"))
|
||||
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user