refactor(web): unify form controls, one notification rule, dedupe i18n copy (#54)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Yaowei Zheng
2026-07-24 18:43:18 +08:00
committed by GitHub
parent c7465625a4
commit 3f868ac385
50 changed files with 2391 additions and 1190 deletions
+19
View File
@@ -475,8 +475,27 @@ export interface SessionInfo {
archived: boolean;
}
/**
* Session list category, the sidebar's four-way split applied server-side: archived wins
* regardless of origin (archiving is an explicit user action), then the origin's bucket,
* and a Session with no (or an unknown) source is `active` — user-created rows.
*/
export type SessionCategory = "active" | SessionSource | "archived";
/** Per-category totals across an Agent's whole Session list (returned when the list is requested with counts). */
export type SessionCategoryCounts = Record<SessionCategory, number>;
export interface SessionsResponse {
sessions: SessionInfo[];
/** Present when the request asked for counts (`counts=1`): totals per category over the full list, not just the returned page. */
counts?: SessionCategoryCounts;
/**
* Present with `counts`: the same totals broken down by Workspace path (only paths
* with at least one Session appear). The sidebar's workspace grouping decides each
* group's folders and "More" from its own share, so a group never advertises
* content that lives in other Workspaces.
*/
workspaceCounts?: Record<string, SessionCategoryCounts>;
}
/** Server directory browsing (advanced new-Workspace picker): starts from the home directory by default, can navigate up to the root. */