@xrn1997/dsh-session-delete 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -39
- package/lib/client.js +26498 -26519
- package/lib/index.js +2090 -1698
- package/lib/types/api/archive-rows.d.ts +4 -17
- package/lib/types/api/attachment-orphans.d.ts +3 -9
- package/lib/types/api/attachment.d.ts +4 -18
- package/lib/types/api/connection-route.d.ts +2 -6
- package/lib/types/api/route-table.d.ts +18 -59
- package/lib/types/api/trash-rows.d.ts +6 -22
- package/lib/types/client/api-base.d.ts +5 -12
- package/lib/types/client/archive-detail.d.ts +6 -14
- package/lib/types/client/archive-pane.d.ts +27 -24
- package/lib/types/client/archive-store.d.ts +7 -3
- package/lib/types/client/attachment-view.d.ts +3 -10
- package/lib/types/client/batch-bar.d.ts +4 -15
- package/lib/types/client/batch-confirm.d.ts +17 -22
- package/lib/types/client/batch-menu-item.d.ts +2 -10
- package/lib/types/client/batch-pick.d.ts +6 -14
- package/lib/types/client/batch-select.d.ts +10 -25
- package/lib/types/client/batch-selection-store.d.ts +21 -9
- package/lib/types/client/busy-gate.d.ts +2 -4
- package/lib/types/client/config-settings.d.ts +2 -3
- package/lib/types/client/confirm-dialog.d.ts +4 -7
- package/lib/types/client/context-menu-actions.d.ts +2 -8
- package/lib/types/client/context.d.ts +6 -15
- package/lib/types/client/copy.d.ts +33 -44
- package/lib/types/client/delete-confirm.d.ts +25 -13
- package/lib/types/client/delete-menu-item.d.ts +5 -9
- package/lib/types/client/detail-blocks.d.ts +5 -6
- package/lib/types/client/detail-ledger.d.ts +6 -10
- package/lib/types/client/detail-pane.d.ts +5 -10
- package/lib/types/client/host-archive-watch.d.ts +5 -18
- package/lib/types/client/host-rows.d.ts +31 -42
- package/lib/types/client/index.d.ts +5 -19
- package/lib/types/client/main-view.d.ts +25 -34
- package/lib/types/client/maintenance-parts.d.ts +2 -5
- package/lib/types/client/maintenance-settings.d.ts +3 -13
- package/lib/types/client/markdown.d.ts +4 -9
- package/lib/types/client/notice.d.ts +2 -5
- package/lib/types/client/orphan-maintenance.d.ts +7 -19
- package/lib/types/client/panel-tab.d.ts +39 -0
- package/lib/types/client/pending-open.d.ts +0 -1
- package/lib/types/client/plugin.d.ts +2 -4
- package/lib/types/client/prompt-rail.d.ts +1 -2
- package/lib/types/client/receipt.d.ts +13 -43
- package/lib/types/client/remote.d.ts +32 -98
- package/lib/types/client/scene.d.ts +41 -0
- package/lib/types/client/session-detail.d.ts +11 -41
- package/lib/types/client/session-list.d.ts +10 -44
- package/lib/types/client/session-live.d.ts +3 -13
- package/lib/types/client/settings-cards.d.ts +3 -6
- package/lib/types/client/settings-view.d.ts +1 -7
- package/lib/types/client/store.d.ts +6 -25
- package/lib/types/client/subagent-section.d.ts +4 -13
- package/lib/types/client/trash-confirm.d.ts +7 -9
- package/lib/types/client/trash-detail.d.ts +9 -12
- package/lib/types/client/trash-entry.d.ts +1 -1
- package/lib/types/client/trash-nav.d.ts +4 -11
- package/lib/types/client/trash-panel.d.ts +4 -6
- package/lib/types/client/trash-snapshot.d.ts +27 -22
- package/lib/types/client/trash-store.d.ts +12 -4
- package/lib/types/client/trash-tab.d.ts +22 -0
- package/lib/types/client/trash-view.d.ts +19 -49
- package/lib/types/client/ui/ErrorBoundary.d.ts +2 -1
- package/lib/types/client/ui/Modal.d.ts +3 -1
- package/lib/types/client/ui/Toast.d.ts +6 -3
- package/lib/types/client/undo-notices.d.ts +41 -30
- package/lib/types/client/undo-toast.d.ts +6 -12
- package/lib/types/client/use-archive-detail-reader.d.ts +2 -3
- package/lib/types/client/use-archive-panel-controller.d.ts +9 -38
- package/lib/types/client/use-archive-query.d.ts +2 -0
- package/lib/types/client/use-column-resize.d.ts +4 -11
- package/lib/types/client/use-detail-frame.d.ts +50 -0
- package/lib/types/client/use-detail-pager.d.ts +5 -13
- package/lib/types/client/use-detail-rail.d.ts +5 -14
- package/lib/types/client/use-detail-reader.d.ts +5 -16
- package/lib/types/client/use-gated-refresh.d.ts +3 -3
- package/lib/types/client/use-list-selection.d.ts +2 -3
- package/lib/types/client/use-maintenance-section.d.ts +7 -12
- package/lib/types/client/use-maintenance.d.ts +7 -13
- package/lib/types/client/use-panel-child-view.d.ts +20 -0
- package/lib/types/client/use-panel-list-read.d.ts +51 -0
- package/lib/types/client/use-panel-selection.d.ts +1 -3
- package/lib/types/client/use-panel-tab.d.ts +134 -0
- package/lib/types/client/use-panel-width.d.ts +3 -11
- package/lib/types/client/use-prompt-rail.d.ts +8 -28
- package/lib/types/client/use-trash-detail-reader.d.ts +3 -10
- package/lib/types/client/use-trash-panel-controller.d.ts +14 -46
- package/lib/types/client/use-trash-query.d.ts +9 -25
- package/lib/types/client/use-write-progress.d.ts +26 -0
- package/lib/types/client/write-progress.d.ts +18 -0
- package/lib/types/client/write-seats.d.ts +33 -75
- package/lib/types/config.d.ts +8 -25
- package/lib/types/deps.d.ts +6 -11
- package/lib/types/domain/closure.d.ts +11 -30
- package/lib/types/errors.d.ts +6 -12
- package/lib/types/index.d.ts +9 -32
- package/lib/types/log/session-log.d.ts +33 -25
- package/lib/types/log/zstd-frames.d.ts +7 -29
- package/lib/types/ports/agent-handles.d.ts +10 -19
- package/lib/types/ports/attachments-port.d.ts +2 -6
- package/lib/types/ports/fs-port.d.ts +17 -31
- package/lib/types/ports/home.d.ts +7 -15
- package/lib/types/ports/host-port.d.ts +51 -98
- package/lib/types/ports/presence-port.d.ts +5 -12
- package/lib/types/remote/map-error.d.ts +4 -17
- package/lib/types/shared/apply-actions.d.ts +36 -0
- package/lib/types/shared/apply-values.d.ts +163 -0
- package/lib/types/shared/project-key.d.ts +5 -23
- package/lib/types/shared/session-path.d.ts +8 -33
- package/lib/types/shared/value-schema.d.ts +54 -0
- package/lib/types/shared/wire.d.ts +117 -249
- package/lib/types/trash/archive-detail.d.ts +9 -20
- package/lib/types/trash/attachments.d.ts +60 -46
- package/lib/types/trash/detail.d.ts +17 -36
- package/lib/types/trash/display-name.d.ts +2 -5
- package/lib/types/trash/entry.d.ts +19 -44
- package/lib/types/trash/groups.d.ts +17 -26
- package/lib/types/trash/ledger.d.ts +5 -11
- package/lib/types/trash/manifest.d.ts +4 -6
- package/lib/types/trash/projection-cache.d.ts +5 -11
- package/lib/types/trash/reconcile.d.ts +11 -23
- package/lib/types/trash/session-rows.d.ts +15 -35
- package/lib/types/trash/shrinking-view.d.ts +10 -11
- package/lib/types/trash/storage-manifest.d.ts +4 -7
- package/lib/types/trash/subagent-summary.d.ts +35 -0
- package/lib/types/verbs/batch-carried.d.ts +22 -4
- package/lib/types/verbs/batch.d.ts +39 -2
- package/lib/types/verbs/config.d.ts +3 -11
- package/lib/types/verbs/delete-session.d.ts +8 -13
- package/lib/types/verbs/empty-batch.d.ts +18 -0
- package/lib/types/verbs/live-admission.d.ts +3 -10
- package/lib/types/verbs/member-journal.d.ts +3 -7
- package/lib/types/verbs/member-presence.d.ts +7 -18
- package/lib/types/verbs/move-group.d.ts +2 -6
- package/lib/types/verbs/orphan-subagents.d.ts +23 -36
- package/lib/types/verbs/permanent-removal.d.ts +91 -84
- package/lib/types/verbs/restore-session.d.ts +10 -26
- package/lib/types/verbs/trash-scope.d.ts +21 -30
- package/lib/types/verbs/write-progress.d.ts +37 -0
- package/package.json +135 -134
- package/lib/types/client/reset-client-state.d.ts +0 -1
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { type Translate } from './copy.js';
|
|
2
2
|
import type { OrphanReportWire } from '../shared/wire.js';
|
|
3
|
-
import type { TrashEntryLike } from './remote.js';
|
|
3
|
+
import type { OneShotDeps, TrashEntryLike } from './remote.js';
|
|
4
4
|
import type { PendingAction } from './use-trash-panel-controller.js';
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* 批量彻底删除只给条数——那批的"去哪"没有可说的,而"不可恢复"那句警告才是要读的。
|
|
10
|
-
*/
|
|
11
|
-
export declare function TrashConfirm({ pending, restoreEntries, busy, t, onCancel, onConfirmPurge, onConfirmRestore, }: {
|
|
5
|
+
/** 两种批量动作共用确认框壳:批量恢复把条目列成卡片(去向是每条各自的旧项目目录);批量彻底删除
|
|
6
|
+
* 只给条数——"不可恢复"那句警告才是要读的。 */
|
|
7
|
+
export declare function TrashConfirm({ deps, pending, restoreEntries, busy, t, onCancel, onConfirmPurge, onConfirmRestore, }: {
|
|
8
|
+
deps: OneShotDeps;
|
|
12
9
|
pending: PendingAction;
|
|
13
10
|
restoreEntries: readonly TrashEntryLike[];
|
|
14
11
|
busy: boolean;
|
|
@@ -18,7 +15,8 @@ export declare function TrashConfirm({ pending, restoreEntries, busy, t, onCance
|
|
|
18
15
|
onConfirmRestore: (ids: readonly string[]) => void;
|
|
19
16
|
}): import("react").JSX.Element;
|
|
20
17
|
/** 无主子会话的清理确认框。载荷是刚扫出来的那份报告,界面不重算。 */
|
|
21
|
-
export declare function OrphanConfirm({ report, busy, t, onCancel, onConfirm, }: {
|
|
18
|
+
export declare function OrphanConfirm({ deps, report, busy, t, onCancel, onConfirm, }: {
|
|
19
|
+
deps: OneShotDeps;
|
|
22
20
|
report: OrphanReportWire;
|
|
23
21
|
busy: boolean;
|
|
24
22
|
t: Translate;
|
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 回收站详情块:`session-detail.tsx`
|
|
3
|
-
* (含「回收站目录」「原本归档」)、子会话段(徽标 + 段体)。取数与账本不在这(见
|
|
4
|
-
* `use-trash-detail-reader.ts`);通用的状态壳、正文块、工作步骤与分页住 `session-detail.tsx`。
|
|
2
|
+
* 回收站详情块:`session-detail.tsx` 的回收站投影。取数与账本住 `use-trash-detail-reader.ts`。
|
|
5
3
|
*/
|
|
6
4
|
import type { Translate } from './copy.js';
|
|
7
5
|
import type { TrashEntryWire } from '../shared/wire.js';
|
|
8
6
|
import type { TrashDetailLike } from './remote.js';
|
|
9
|
-
import { type DetailNav
|
|
7
|
+
import { type DetailNav } from './session-detail.js';
|
|
8
|
+
import type { DetailFrame } from './use-detail-frame.js';
|
|
10
9
|
import type { DetailState } from './use-detail-reader.js';
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* 形状与通用详情读路同为 `DetailState`(主体键 `subject`);两档不再各持一份可互转的副本。 */
|
|
10
|
+
/** 详情主体只承诺清册那一行:孩子视图看的那条不在客户端清单里,没有只读数可配对(判据住 `TrashDetailLike`);
|
|
11
|
+
* 形状与通用详情读路同为 `DetailState`。 */
|
|
14
12
|
export type TrashDetailState = DetailState<TrashEntryWire, TrashDetailLike>;
|
|
15
13
|
export interface TrashDetailProps {
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
/** 详情帧(`use-detail-frame.ts`):回收站档的读路来源 + 分页读面 + 提问轨,面板拼一次、这里原样转交。 */
|
|
15
|
+
frame: DetailFrame<TrashEntryWire, TrashDetailLike>;
|
|
18
16
|
busy: boolean;
|
|
19
|
-
/**
|
|
17
|
+
/** 宽档不画「返回清单」——同屏就有清单;孩子视图另有一颗返回,见 `detailNav.parentContext`。 */
|
|
20
18
|
wide: boolean;
|
|
21
19
|
onRetry: () => void;
|
|
22
20
|
onBack: () => void;
|
|
23
21
|
/** 孩子视图的开与回(控制器派生,判据见 `DetailNav`):缺席 = 不画入口/返回,组件只画状态,不自己造动作。 */
|
|
24
22
|
detailNav: DetailNav;
|
|
25
|
-
pager: DetailPager;
|
|
26
23
|
t: Translate;
|
|
27
24
|
}
|
|
28
|
-
export declare function TrashDetail({
|
|
25
|
+
export declare function TrashDetail({ frame, busy, wide, onRetry, onBack, detailNav, t, }: TrashDetailProps): import("react").JSX.Element;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { KeyboardEvent as ReactKeyboardEvent, RefObject } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* 导航要的面。`ordered`
|
|
4
|
-
*
|
|
5
|
-
* 只移动选中,与整行点击的 `{ drill: !split }` 同一条判据)。四个动作都由调用方注入:
|
|
6
|
-
* `select` 只移动选中(带 `drill` 才下钻),`back` 是控制器的回退动作(两程:先收孩子视图、
|
|
7
|
-
* 再退下钻),`focusRow` 把焦点交给某一行。
|
|
3
|
+
* 导航要的面。`ordered` 是屏幕上的顺序(只含展开的组);`drillEnabled` 是这一档支不支持整行下钻。
|
|
4
|
+
* 四个动作都由调用方注入:`select`(带 `drill` 才下钻)、`back`(两程回退)、`focusRow`。
|
|
8
5
|
*/
|
|
9
6
|
export interface TrashNavInput<R> {
|
|
10
7
|
ordered: readonly R[];
|
|
@@ -14,18 +11,14 @@ export interface TrashNavInput<R> {
|
|
|
14
11
|
selectMode: boolean;
|
|
15
12
|
drillEnabled: boolean;
|
|
16
13
|
drilled: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* 实现体一个都不读 `this`。方法简写会带上隐式 `this: TrashNavInput`,`unbound-method`
|
|
19
|
-
* 会把这种交接报成可疑;改属性只是让类型面说真话。 */
|
|
14
|
+
/** 四个动作都是**属性声明**:被摘下来交接,实现体不读 `this`;方法简写会被 `unbound-method` 报成可疑。 */
|
|
20
15
|
select: (row: R, options?: {
|
|
21
16
|
drill?: boolean;
|
|
22
17
|
}) => Promise<void>;
|
|
23
18
|
toggleCheck: (rowId: string) => void;
|
|
24
19
|
back: () => void;
|
|
25
20
|
focusRow: (rowId: string) => void;
|
|
26
|
-
/** Esc
|
|
27
|
-
* 但详情在面板里;**焦点在面板外**的 Esc 不归清单——否则在侧栏或别的面板按 Esc 会退出下钻,
|
|
28
|
-
* 还会把焦点拽进回收站。根还没挂上时无从判断包含关系,Esc 不处理。 */
|
|
21
|
+
/** Esc 的作用域(面板根节点):**焦点在面板外**的 Esc 不归清单;根还没挂上时无从判断,不处理。 */
|
|
29
22
|
scope: RefObject<HTMLElement | null>;
|
|
30
23
|
}
|
|
31
24
|
export interface TrashNav {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { type Translate } from './copy.js';
|
|
2
|
-
import {
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
* 维护卡的手动动作(`use-maintenance.ts`),面板一次都不自动扫(ADR-0021)。 */
|
|
7
|
-
export type TrashPanelDeps = Pick<SessionDeleteRemote, 'list' | 'detail' | 'applyOutcomes' | 'emptyTrash' | 'archiveList' | 'archiveDetail'>;
|
|
2
|
+
import type { PanelTabDeps } from './use-panel-tab.js';
|
|
3
|
+
/** 面板的依赖面:两个读 + 一段 `apply` + 清空 + 归档两读;**没有第二条路**(N=1 也走 `apply`)。
|
|
4
|
+
* 无主子会话检查是维护卡的手动动作(ADR-0021),面板不自动扫。 */
|
|
5
|
+
export type TrashPanelDeps = PanelTabDeps;
|
|
8
6
|
export interface TrashPanelProps {
|
|
9
7
|
deps: TrashPanelDeps;
|
|
10
8
|
/** 文案(缺省 = 内置 zh,见 `copy.ts`:这不是"忘了传",而是"这次没有 locale 服务")。 */
|
|
@@ -5,34 +5,39 @@ export interface TrashSnapshot {
|
|
|
5
5
|
readonly selectedId: string | null;
|
|
6
6
|
readonly details: ReadonlyMap<string, TrashDetailLike>;
|
|
7
7
|
}
|
|
8
|
-
/**
|
|
8
|
+
/** 一台首帧快照 + 详情账本:意图名与可观察规则住类型,实例互不串味。 */
|
|
9
|
+
export interface TrashSnapshotScene {
|
|
10
|
+
/** 读当前快照;没有(或已 clear)⇒ null。只在挂载首帧读一次,不做订阅。 */
|
|
11
|
+
read(): TrashSnapshot | null;
|
|
12
|
+
/** 读一条已成功读到的详情:详情账本的唯一读口,清单快照是否存在不影响它。 */
|
|
13
|
+
readDetail(entryId: string): TrashDetailLike | undefined;
|
|
14
|
+
/** 写入一份**成功**的清单读数:复制数组、按上一份清单修剪详情账本,选中行不在了就置空。 */
|
|
15
|
+
reloadSucceeded(rows: readonly TrashEntryLike[]): void;
|
|
16
|
+
/** 记下选中行;没有清单快照时无处可挂,直接忽略。 */
|
|
17
|
+
noteSelection(entryId: string | null): void;
|
|
18
|
+
/** 记下一条成功读到的详情(写时复制);失败不写。 */
|
|
19
|
+
writeDetail(entryId: string, detail: TrashDetailLike): void;
|
|
20
|
+
/** 丢掉一条详情(恢复 / 彻底删除成功、或那一条的读数失败)。 */
|
|
21
|
+
rowGone(entryId: string): void;
|
|
22
|
+
/** 按写动作的成功名单丢一组详情。 */
|
|
23
|
+
writeSucceeded(entryIds: readonly string[]): void;
|
|
24
|
+
/** 丢掉整份快照与详情账本:清单读失败、清空失败,以及测试/HMR 复位。 */
|
|
25
|
+
reloadFailed(): void;
|
|
26
|
+
/** 只丢详情账本,清单快照原样留着:清空回收站**成功**后走这一条。 */
|
|
27
|
+
emptiedTrash(): void;
|
|
28
|
+
/** 场景收场:与 `reloadFailed` 同一条(快照/账本没有额外的在飞票要作废)。 */
|
|
29
|
+
reset(): void;
|
|
30
|
+
}
|
|
31
|
+
export declare function createTrashSnapshotScene(): TrashSnapshotScene;
|
|
9
32
|
export declare function readTrashSnapshot(): TrashSnapshot | null;
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
* 两个「唯一实现」不是同一个东西,grep 不该把它们混在一起。 */
|
|
33
|
+
/** 读一条已成功读到的详情(默认场景)。名字带 `Cached`:Node 半的 `trash/detail.ts` 也有一个
|
|
34
|
+
* `readTrashDetail`(读会话日志),两个「唯一实现」不是同一个东西,grep 不该把它们混在一起。 */
|
|
13
35
|
export declare function readCachedTrashDetail(entryId: string): TrashDetailLike | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* 写入一份**成功**的清单读数:复制数组、按上一份清单修剪详情账本,选中行不在了就置空。
|
|
16
|
-
* 只修剪「上一份清单里出现过、这一份不见了」的条目:孩子详情从不在清单行里,不能被误删。
|
|
17
|
-
* 调用方是 `use-trash-query` 的 `reload` 成功支;失败支不许调它。
|
|
18
|
-
*/
|
|
36
|
+
/** 写回成功读数:失败支不许调(默认场景)。 */
|
|
19
37
|
export declare function reloadSucceeded(rows: readonly TrashEntryLike[]): void;
|
|
20
|
-
/** 记下选中行;没有清单快照时无处可挂,直接忽略。 */
|
|
21
38
|
export declare function noteSelection(entryId: string | null): void;
|
|
22
|
-
/** 记下一条成功读到的详情;失败不写(失败由调用方落 `failed` 状态)。
|
|
23
|
-
* 写时复制:已经交出去的 `snapshot.details` 引用永远不再变,读方可以安全地比引用。
|
|
24
|
-
* 挪队尾与淘汰到上限的口径与归档那本共用(`detail-ledger.ts`)。 */
|
|
25
39
|
export declare function writeTrashDetail(entryId: string, detail: TrashDetailLike): void;
|
|
26
|
-
/** 丢掉一条详情(恢复 / 彻底删除成功、或那一条的读数失败)。写时复制,口径同 `writeTrashDetail`。 */
|
|
27
40
|
export declare function rowGone(entryId: string): void;
|
|
28
|
-
/** 按写动作的成功名单丢一组详情(settlement 收尾与撤销座位共用):逐条走 `rowGone`。 */
|
|
29
41
|
export declare function writeSucceeded(entryIds: readonly string[]): void;
|
|
30
|
-
/** 丢掉整份快照与详情账本:清单读失败、清空失败,以及测试/HMR 复位都走这一条。 */
|
|
31
42
|
export declare function reloadFailed(): void;
|
|
32
|
-
/**
|
|
33
|
-
* 只丢详情账本,清单快照原样留着:清空回收站**成功**后走这一条——`emptyTrash` 已经重读并
|
|
34
|
-
* `reloadSucceeded([])` 写下过一份空清单,整份 clear 会把这份成功读数也丢掉,下一次挂载
|
|
35
|
-
* 又从「正在读回收站…」起画(ADR-0048 要消灭的正是这帧闪)。要丢的只有详情:随条目作废,
|
|
36
|
-
* 而且孩子详情不随清单修剪,不丢就永远留在账本里(ADR-0048 决定 4)。
|
|
37
|
-
*/
|
|
38
43
|
export declare function emptiedTrash(): void;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** 一台回收站修订台:戳一下 / 订阅 / 收场。 */
|
|
2
|
+
export interface TrashRevisionScene {
|
|
3
|
+
/** 通告一次"回收站变过了"(删除成功、撤销成功;面板自己的恢复/彻底删除则就地重读)。 */
|
|
4
|
+
invalidate(): void;
|
|
5
|
+
/** 供面板与归档档订阅:修订号进 `useGatedRefresh` 的修订集合。 */
|
|
6
|
+
use(): number;
|
|
7
|
+
/** 场景收场:修订号归零(订阅者随组件卸载自行退订)。 */
|
|
8
|
+
reset(): void;
|
|
9
|
+
}
|
|
10
|
+
export declare function createTrashRevisionScene(): TrashRevisionScene;
|
|
11
|
+
/** 兼容自由函数(旧调用点与测试):委托默认场景的实例。 */
|
|
2
12
|
export declare function invalidateTrash(): void;
|
|
3
|
-
/**
|
|
13
|
+
/** 供面板订阅(生产走 Provider 的那一份;测试无 Provider 回退默认场景)。 */
|
|
4
14
|
export declare function useTrashRevision(): number;
|
|
5
|
-
/** 测试专用:修订号归零(订阅者随组件卸载自行退订)。 */
|
|
6
|
-
export declare function resetTrashStore(): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 回收站档:adapter(两档差异的回收站那一半)+ 本档四个视图件(清单行读数 / 详情投影 / 工具行 / 页脚)。
|
|
3
|
+
* 装配线住 `use-panel-tab.ts`,四格版面住 `panel-tab.tsx`;判据与 DOM 身份不变。
|
|
4
|
+
*/
|
|
5
|
+
import { type TrashEntryWire } from '../shared/wire.js';
|
|
6
|
+
import { type Translate } from './copy.js';
|
|
7
|
+
import type { TrashDetailLike } from './remote.js';
|
|
8
|
+
import type { TrashEntryLike } from './remote.js';
|
|
9
|
+
import { type TrashQuery } from './use-trash-query.js';
|
|
10
|
+
import { type TrashPanelController } from './use-trash-panel-controller.js';
|
|
11
|
+
import { type PanelTab, type PanelTabAdapter, type PanelTabContext } from './use-panel-tab.js';
|
|
12
|
+
import { type PanelTabFrameLayout } from './panel-tab.js';
|
|
13
|
+
export declare const TRASH_TAB_ADAPTER: PanelTabAdapter<TrashQuery, TrashEntryLike, TrashEntryWire, TrashDetailLike, TrashPanelController>;
|
|
14
|
+
export type TrashPanelTab = PanelTab<TrashQuery, TrashEntryLike, TrashEntryWire, TrashDetailLike, TrashPanelController>;
|
|
15
|
+
export interface TrashTabViewProps {
|
|
16
|
+
readonly tab: TrashPanelTab;
|
|
17
|
+
readonly layout: PanelTabFrameLayout;
|
|
18
|
+
readonly t: Translate;
|
|
19
|
+
}
|
|
20
|
+
/** 回收站档的四格视图:清单、详情、工具行(折叠 / 多选)、页脚(「不自动过期」+ 清空 / 批量两颗)。 */
|
|
21
|
+
export declare function TrashTabView({ tab, layout, t }: TrashTabViewProps): import("react").JSX.Element;
|
|
22
|
+
export declare function useTrashTab(ctx: PanelTabContext): TrashPanelTab;
|
|
@@ -1,48 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* 它从 `trash-panel.tsx` 拆出来,因为清单面板与两个确认框(`trash-confirm.tsx`)都要用这几样——
|
|
5
|
-
* 拆之前它们同住一个文件、只能靠"同一个文件里的常量"共享。拆之后两处读的是同一份,不是两份抄写。
|
|
6
|
-
*
|
|
7
|
-
* **配色与圆角一律走 token,字号是字面量 px**(宿主同类面也这么写):卡片用宿主设置面的底层 token
|
|
8
|
-
* (`bg-layer-2` + `border-l4` + `radius-lg`),清单行不铺底不描边、选中态只换宿主"选中"那一档底色。
|
|
2
|
+
* 回收站界面共用的**视图词汇**:卡片配方、清单行、危险红、项目名与分组的念法(面板与两个确认框共用)。
|
|
3
|
+
* **配色与圆角一律走 token,字号是字面量 px**:卡片用宿主设置面的底层 token,清单行不铺底不描边。
|
|
9
4
|
*/
|
|
10
5
|
import type { CSSProperties } from 'react';
|
|
11
6
|
import type { Translate } from './copy.js';
|
|
12
7
|
/** 卡片配方:宿主设置面的 fill/stroke 底层 token + 官方 `lg` 圆角。 */
|
|
13
8
|
export declare const CARD: CSSProperties;
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* 为什么和 `CARD` 分成两份而不改 `CARD`:`CARD` 还被读数失败块与附件回执块借用(`trash-panel.tsx`
|
|
18
|
-
* 的 `role="status"`、`attachment-view.tsx`),那一类是"要打断你视线的一块",带底色和边框才对;
|
|
19
|
-
* 清单行是"一列可以扫的东西",边框叠出来就是 2010 年代后台面板的长相。
|
|
20
|
-
*
|
|
21
|
-
* 悬停底色与动作列的低强调/提亮住在 `ui/layout.css`:inline style 表达不了 `:hover` /
|
|
22
|
-
* `:focus-within`,而 `ui.css` 是照宿主明文逐字抄的对照表,混进自造规则会把保真复核弄脏
|
|
23
|
-
* (同 `forms.css` 文件头给的理由)。
|
|
24
|
-
*/
|
|
9
|
+
/** 清单条目行:与 `CARD` 同族但不铺底、不描边——`CARD` 借给读数失败块与附件回执块(要打断视线),
|
|
10
|
+
* 清单行是"一列可以扫的东西"。悬停底色住在 `ui/layout.css`:inline style 表达不了 `:hover`。 */
|
|
25
11
|
export declare const ROW: CSSProperties;
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* 样式表里的 `:hover` 规则,选中与悬停同时成立时看到的是选中那一档,不会闪。
|
|
29
|
-
*/
|
|
12
|
+
/** 选中行:底色用 inline style 故意压在 `layout.css` 的悬停底色之上——元素声明优先于 `:hover`,
|
|
13
|
+
* 选中与悬停同时成立时看到选中那一档。 */
|
|
30
14
|
export declare const ROW_SELECTED: CSSProperties;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* 覆盖的是**本插件别名层**(`--sd-*`,见 `ui.css` 头注)而不是宿主私有 token:别名在 `body` 上
|
|
36
|
-
* 就把 `var(--dsw-…, 兜底)` 算完并继承下来了,元素上再覆盖底层私有 token 已经传不进继承值。
|
|
37
|
-
*/
|
|
15
|
+
/** **整页唯一那块实心红**:`variant="primary"` + 在元素上覆盖 primary 那对填充 token(宿主插件管理页的
|
|
16
|
+
* danger 按钮同写法,asar @21658274,所以 hover 仍走 `.primary:hover`)。
|
|
17
|
+
* 覆盖的是**本插件别名层**(`--sd-*`):别名在 `body` 上已把 `var(--dsw-…)` 算完,元素上再覆盖
|
|
18
|
+
* 底层私有 token 传不进继承值。 */
|
|
38
19
|
export declare const BULK_DANGER: CSSProperties;
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* 摘掉 `--…--` 裹边、还原这些转义,剩下的原样摆出来,完整串交给组头 `title`。
|
|
43
|
-
* 字母表只有一份:还原走 `src/shared/project-key.ts` 的 `unescapeProjectKey`;无 cwd 的目录名
|
|
44
|
-
* 也认同一个共享字面量(`NO_CWD_PROJECT_DIR`),不在浏览器半另写一份 `_no-cwd`。
|
|
45
|
-
*/
|
|
20
|
+
/** 项目名怎么念:宿主 `projectKey` 把分隔符折成一个 `-`(有损),非分隔符部分可逆(`~XXXX` 码元)。
|
|
21
|
+
* 摘掉 `--…--` 裹边并还原转义;还原走 `src/shared/project-key.ts` 的 `unescapeProjectKey`,无 cwd
|
|
22
|
+
* 也认同一个共享字面量 `NO_CWD_PROJECT_DIR`,不在浏览器半另写一份。 */
|
|
46
23
|
export declare function projectLabel(projectDir: string, t: Translate): string;
|
|
47
24
|
/** 清单上的一个项目组(组头 + 组内的行,组内按时间键倒序)。两档共用:行类型是参数。 */
|
|
48
25
|
export interface ProjectGroup<R> {
|
|
@@ -56,11 +33,8 @@ export interface ProjectGroup<R> {
|
|
|
56
33
|
latest: number;
|
|
57
34
|
rows: readonly R[];
|
|
58
35
|
}
|
|
59
|
-
/**
|
|
60
|
-
*
|
|
61
|
-
* 哨兵值不与真实 `projectDir` 同形——空 cwd 已经由 `projectLabel` 念成「未记录项目」,
|
|
62
|
-
* 两者不是同一件事,不能撞键。
|
|
63
|
-
*/
|
|
36
|
+
/** 「未分组」组的键:工作区已删(`workspaceMissing`)的条目归这里;哨兵不与真实 `projectDir` 同形
|
|
37
|
+
* (空 cwd 念「未记录项目」,两者不能撞键)。 */
|
|
64
38
|
export declare const UNGROUPED_PROJECT_DIR = "__dsh-session-delete__ungrouped";
|
|
65
39
|
/** 分组键:回收站传删除时间 + workspaceMissing⇒未分组;归档传 `updatedAt`、不传 `ungroupedOf`。 */
|
|
66
40
|
export interface GroupKeys<R> {
|
|
@@ -72,23 +46,19 @@ export interface GroupKeys<R> {
|
|
|
72
46
|
}
|
|
73
47
|
/** 按项目分组:组内按时间键倒序,组间按各组最新一条倒序;「未分组」组(若有)永远沉底。 */
|
|
74
48
|
export declare function groupByProject<R>(rows: readonly R[], t: Translate, keys: GroupKeys<R>): ProjectGroup<R>[];
|
|
75
|
-
/**
|
|
76
|
-
* **次序只有这一份**;兜底那句归调用方——子会话行念「(无标题会话)」、归档行念「未命名 · <短 id>」,
|
|
77
|
-
* 那不是同一句话,但谁先谁后不许各拼一遍。 */
|
|
49
|
+
/** 显示名次序前两格(ADR-0058):`label` 非空优先,否则 `title`;兜底那句归调用方。次序只有这一份。 */
|
|
78
50
|
export declare function preferredNameOf(row: {
|
|
79
51
|
readonly label?: string;
|
|
80
52
|
readonly title: string;
|
|
81
53
|
}): string;
|
|
82
|
-
/**
|
|
83
|
-
* 清单行、详情标题、删除确认框共用这一条(不许各拼一份)。 */
|
|
54
|
+
/** 归档行显示名:都空回落「未命名 · <短 id>」;清单行、详情标题、删除确认框共用这一条。 */
|
|
84
55
|
export declare function displayNameOf(row: {
|
|
85
56
|
label?: string;
|
|
86
57
|
title: string;
|
|
87
58
|
sessionId: string;
|
|
88
59
|
}, t: Translate): string;
|
|
89
|
-
/** 详情标题排的显示名次序(两档共用):行 label →
|
|
90
|
-
*
|
|
91
|
-
* 父日志 `subagent/catalog` 那一格。次序只住这里,两档各自算会漂。 */
|
|
60
|
+
/** 详情标题排的显示名次序(两档共用):行 label → 详情 label → 行标题 → 日志标题 → 调用方兜底;
|
|
61
|
+
* 详情 label 补的是没有父行可兜的独立子会话(ADR-0058)。次序只住这里。 */
|
|
92
62
|
export declare function detailNameOf(row: {
|
|
93
63
|
readonly label?: string;
|
|
94
64
|
readonly title: string;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* 一次;刷新页面 / HMR 换代才是恢复路径。文案由注册处按 `t` 给(见 `copy.ts`)。
|
|
11
11
|
*/
|
|
12
12
|
import { Component, type ComponentType, type ErrorInfo, type ReactNode } from 'react';
|
|
13
|
+
import { type ClientScene } from '../scene.js';
|
|
13
14
|
export interface ErrorBoundaryProps {
|
|
14
15
|
/** 崩溃时上屏的本地化文案(注册处按 `t` 给)。 */
|
|
15
16
|
fallback: string;
|
|
@@ -28,5 +29,5 @@ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBo
|
|
|
28
29
|
* 把一条槽位贡献包进边界:注册表里登记的组件就是这一层。`displayName` 带上来源,测试与
|
|
29
30
|
* 宿主调试面板都能一眼看出这是被隔离过的那颗。
|
|
30
31
|
*/
|
|
31
|
-
export declare function withErrorBoundary<P extends object>(Wrapped: ComponentType<P>, fallback: string): ComponentType<P>;
|
|
32
|
+
export declare function withErrorBoundary<P extends object>(Wrapped: ComponentType<P>, fallback: string, scene?: ClientScene): ComponentType<P>;
|
|
32
33
|
export {};
|
|
@@ -30,6 +30,8 @@ export interface ModalProps {
|
|
|
30
30
|
closeLabel: string;
|
|
31
31
|
/** 动作行(取消/确认)。 */
|
|
32
32
|
footer?: ReactNode;
|
|
33
|
+
/** 忙碌中的确认框仍保留关闭钮作为焦点落点,但向辅助技术声明不可关闭。 */
|
|
34
|
+
busy?: boolean;
|
|
33
35
|
children?: ReactNode;
|
|
34
36
|
}
|
|
35
|
-
export declare function Modal({ open, onClose, title, closeLabel, footer, children }: ModalProps): ReactElement | null;
|
|
37
|
+
export declare function Modal({ open, onClose, title, closeLabel, footer, busy, children }: ModalProps): ReactElement | null;
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
* **砍掉的**:`anchor`(把横幅对齐到某个元素的水平中心——本插件的撤销提示就是窗口居中)、
|
|
14
14
|
* `actions[].prefix`(动作文案前的连接词,本插件只用「撤销」两个字)。**没砍 `text`/`icon`/`tone`/
|
|
15
15
|
* `holdMs`/`actions`/`onDone`**:唯一的调用点这几样都在用。
|
|
16
|
-
* **本插件加的**:`paused
|
|
16
|
+
* **本插件加的**:`paused`(撤销在飞时冻结停留与淡出,失败原文要落回同一条横幅;官方没有这个开关);
|
|
17
|
+
* `detail`(排在动作按钮之后的副行槽位,撤销横幅放写入进度行,避免块级节点把按钮挤到下一行)。
|
|
17
18
|
*/
|
|
18
19
|
import { type ReactElement, type ReactNode } from 'react';
|
|
19
20
|
import './styles.js';
|
|
@@ -24,8 +25,10 @@ export interface ToastAction {
|
|
|
24
25
|
disabled?: boolean;
|
|
25
26
|
}
|
|
26
27
|
export interface ToastProps {
|
|
27
|
-
/**
|
|
28
|
+
/** 已解析好的横幅文案(本地化由调用面负责)。副行走 `detail`,主句保持纯文本。 */
|
|
28
29
|
text: string;
|
|
30
|
+
/** 排在动作按钮之后的副行(如在飞进度行):主句与行内按钮先落第一行,块级副行另起第二行,不把按钮挤下去。 */
|
|
31
|
+
detail?: ReactNode;
|
|
29
32
|
/** 前导 glyph;`tone="success"` 时被忽略(那一档自带对勾)。 */
|
|
30
33
|
icon?: ReactNode;
|
|
31
34
|
tone?: 'success';
|
|
@@ -38,4 +41,4 @@ export interface ToastProps {
|
|
|
38
41
|
/** 淡出完成时调用一次:在这里卸载。 */
|
|
39
42
|
onDone: () => void;
|
|
40
43
|
}
|
|
41
|
-
export declare function Toast({ text, icon, tone, holdMs, actions, paused, onDone }: ToastProps): ReactElement;
|
|
44
|
+
export declare function Toast({ text, detail, icon, tone, holdMs, actions, paused, onDone }: ToastProps): ReactElement;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* 同一个 Toast 宿主、同一停留时长;撤销动作按形分派(单条 / 批量),两条都走同一个外部恢复座位
|
|
4
|
-
* (`write-seats.ts` 的 `restoreFromUndo`),单条带 `single: true` 的读法(null 是协议错,不冒充幂等成功)。
|
|
5
|
-
*/
|
|
1
|
+
/** 一次待撤销的事:单条删除(主语是会话名)或批量删除(主语是条数);撤销动作按形分派,
|
|
2
|
+
* 两条都走同一个外部恢复座位(`write-seats.ts` 的 `restoreFromUndo`)。 */
|
|
6
3
|
export type UndoNotice = {
|
|
7
4
|
/** 每次发布递增:Toast 靠它重挂载,同一段文案连续出现两次也能重新计一次停留。 */
|
|
8
5
|
seq: number;
|
|
@@ -23,50 +20,64 @@ export type UndoNotice = {
|
|
|
23
20
|
/** 横幅那句的条数 = 那一次成功支的条数(含幂等带走的)——与撤销名单是两个数,各说各的。 */
|
|
24
21
|
n: number;
|
|
25
22
|
});
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* 落点。`failNotice` 到那时把原文留在这里,等当前没有横幅时由 `undo-toast.tsx` 顶上并到时清掉
|
|
29
|
-
* ——失败不因为横幅先走一步而被吞掉(`docs/ui-spec.md` §2 ③ 的「旧撤销的失败留到空档再上屏」说的就是这一格)。
|
|
30
|
-
*/
|
|
23
|
+
/** 一条待显示的撤销失败:撤销在飞时横幅被新删除覆盖或被面板恢复熄灭,失败就失去了落点;
|
|
24
|
+
* `failNotice` 把原文留在这里,等当前没有横幅时由 `undo-toast.tsx` 顶上——失败不被吞掉。 */
|
|
31
25
|
export interface UndoFailureNotice {
|
|
32
26
|
/** 每次发布递增:Toast 靠它重挂载、重新计停留。 */
|
|
33
27
|
seq: number;
|
|
34
28
|
failure: string;
|
|
35
29
|
}
|
|
36
|
-
/**
|
|
30
|
+
/** 一台撤销通知台:发布 / 改写 / 熄灭 / 两份读数。 */
|
|
31
|
+
export interface UndoNoticeScene {
|
|
32
|
+
/** 删除成功后发布一条撤销提示(单条)。 */
|
|
33
|
+
publishOne(input: {
|
|
34
|
+
entryId: string;
|
|
35
|
+
title: string;
|
|
36
|
+
archived?: boolean;
|
|
37
|
+
}): void;
|
|
38
|
+
/** 批量删除成功后发布一条撤销提示:覆盖上一条,只报这一次移走的条数。 */
|
|
39
|
+
publishBatch(input: {
|
|
40
|
+
entryIds: readonly string[];
|
|
41
|
+
n: number;
|
|
42
|
+
archived?: boolean;
|
|
43
|
+
}): void;
|
|
44
|
+
/** 整条横幅不再留。 */
|
|
45
|
+
clear(): void;
|
|
46
|
+
/** 指向这些条目的横幅熄掉(任一命中就清整条;清空回收站按发起时名单调它)。 */
|
|
47
|
+
dismiss(entryIds: readonly string[]): void;
|
|
48
|
+
/** 当前撤销横幅(当场读;渲染侧用 {@link useNotice})。 */
|
|
49
|
+
read(): UndoNotice | null;
|
|
50
|
+
useNotice(): UndoNotice | null;
|
|
51
|
+
/** 当前没有撤销横幅时要顶上来的那条失败(订阅)。 */
|
|
52
|
+
useFailure(): UndoFailureNotice | null;
|
|
53
|
+
/** 待显示的失败已经上屏:清掉它。 */
|
|
54
|
+
clearFailure(): void;
|
|
55
|
+
/** 这次撤销开始时的那条横幅还在吗——期间被新删除覆盖、或由面板恢复熄灭时,旧请求不许改写它。 */
|
|
56
|
+
owns(current: UndoNotice): boolean;
|
|
57
|
+
/** 撤销失败:把原因换到同一条横幅上;横幅已经不在了就献给待显示队。 */
|
|
58
|
+
fail(current: UndoNotice, message: string): void;
|
|
59
|
+
/** 场景收场:两份现场与 seq 归零。 */
|
|
60
|
+
reset(): void;
|
|
61
|
+
}
|
|
62
|
+
export declare function createUndoNoticeScene(): UndoNoticeScene;
|
|
37
63
|
export declare function publishUndoNotice(input: {
|
|
38
64
|
entryId: string;
|
|
39
65
|
title: string;
|
|
40
66
|
archived?: boolean;
|
|
41
67
|
}): void;
|
|
42
|
-
/** 批量删除成功后发布一条撤销提示:覆盖上一条,只报这一次移走的条数。 */
|
|
43
68
|
export declare function publishUndoBatchNotice(input: {
|
|
44
69
|
entryIds: readonly string[];
|
|
45
70
|
n: number;
|
|
46
71
|
archived?: boolean;
|
|
47
72
|
}): void;
|
|
48
|
-
/**
|
|
49
|
-
* 清空回收站**不走这里**:它按发起时已在回收站里的条目名单调 `dismissUndoNotice`,
|
|
50
|
-
* 免得把清空在飞期间新删除发布的那条一并误熄。 */
|
|
73
|
+
/** 整条横幅不再留(默认场景)。清空回收站不走这里:它按发起时名单调 `dismissUndoNotice`。 */
|
|
51
74
|
export declare function clearUndoNotice(): void;
|
|
52
|
-
/**
|
|
53
|
-
* 指向这些条目的横幅熄掉:某个条目已经在别处恢复,或清空回收站把发起时在场的条目一起清了。
|
|
54
|
-
* 批量里任一命中就清整条——名单少了、计数没变,留着就是一条会骗人的「撤销」动作。
|
|
55
|
-
*/
|
|
56
75
|
export declare function dismissUndoNotice(entryIds: readonly string[]): void;
|
|
57
|
-
/**
|
|
76
|
+
/** 供组件订阅当前横幅(生产走 Provider 的那一份;测试无 Provider 回退默认场景)。 */
|
|
58
77
|
export declare function useUndoNotice(): UndoNotice | null;
|
|
59
|
-
|
|
60
|
-
export declare function
|
|
78
|
+
export declare function useUndoFailure(): UndoFailureNotice | null;
|
|
79
|
+
export declare function clearUndoFailure(): void;
|
|
61
80
|
/** 提示停留时长。**6 秒** 定死在本行(比 Toast 默认的 3 秒长)——`docs/ui-spec.md` §2 ③ 只指到这里,不抄这个数。 */
|
|
62
81
|
export declare const UNDO_HOLD_MS = 6000;
|
|
63
|
-
/** 这次撤销开始时的那条横幅还在吗——期间被新删除覆盖、或由面板恢复熄灭时,旧请求不许改写它。 */
|
|
64
82
|
export declare function ownsNotice(current: UndoNotice): boolean;
|
|
65
|
-
/** 撤销失败:把原因换到同一条横幅上(seq 递增 ⇒ Toast 重挂载、重新计停留)。
|
|
66
|
-
* **横幅已经不在了**(在飞期间被新删除覆盖、或面板恢复 / 清空把它熄灭)时不静默:原文献给
|
|
67
|
-
* 待显示队,`undo-toast.tsx` 在当前没有横幅时把它顶上来(到时清掉)。 */
|
|
68
83
|
export declare function failNotice(current: UndoNotice, message: string): void;
|
|
69
|
-
/** 供 Toast 订阅:当前没有撤销横幅时要顶上来的那条失败。 */
|
|
70
|
-
export declare function useUndoFailure(): UndoFailureNotice | null;
|
|
71
|
-
/** 待显示的失败已经上屏(到时或用户看过):清掉它。 */
|
|
72
|
-
export declare function clearUndoFailure(): void;
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 撤销提示(`docs/ui-spec.md` §2
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* `
|
|
6
|
-
* 为什么组件要独立:宿主的菜单行随菜单**一起卸载**(真产物 Menu 的注释原文
|
|
7
|
-
* "the rows unmount with the list"),而提示要在菜单关掉之后还活着。宿主的官方配方同形——
|
|
8
|
-
* 会话行的动作把请求写进一个模块级 store,`shell.overlay` 里的 `workspace.row-toast` 读它。
|
|
2
|
+
* 撤销提示(`docs/ui-spec.md` §2 ③):删除成功后一条可撤销的横幅。现场与发布住 `undo-notices.ts`,
|
|
3
|
+
* 本文件只做组件;「撤销」整趟交给 `write-seats.ts` 的 `restoreFromUndo`。组件必须独立于菜单行:
|
|
4
|
+
* 宿主的菜单行随菜单一起卸载,而提示要在菜单关掉之后还活着(宿主官方配方同形:模块级 store +
|
|
5
|
+
* `shell.overlay` 里的 toast 读它)。
|
|
9
6
|
*/
|
|
10
7
|
import { type Translate } from './copy.js';
|
|
11
8
|
import type { OneShotDeps } from './remote.js';
|
|
12
9
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* 两种来源共用这一个宿主:**当前横幅**优先;横幅不在时顶上一条待显示的撤销失败(在飞期间
|
|
17
|
-
* 横幅被新删除覆盖或被面板恢复熄灭,失败原文不能跟着消失)。
|
|
10
|
+
* 常驻的撤销提示宿主,挂 `shell.overlay`。两种来源共用:**当前横幅**优先;不在时顶上一条待显示的
|
|
11
|
+
* 撤销失败(在飞期间横幅被覆盖/熄灭,失败原文不能跟着消失)。
|
|
18
12
|
*/
|
|
19
13
|
export declare function UndoToast({ deps, t }: {
|
|
20
14
|
deps: OneShotDeps;
|
|
@@ -11,9 +11,8 @@ export interface ArchiveDetailSubject {
|
|
|
11
11
|
readonly updatedAtSource?: 'prompt' | 'created';
|
|
12
12
|
readonly sizeBytes?: number;
|
|
13
13
|
}
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* 主体的旧快照或导航道都不能替它。 */
|
|
14
|
+
/** 孩子视图的主体:只带详情投影消费的格,时间读数缺席不造 0。归档态不在主体上——
|
|
15
|
+
* 状态行只认这一读的 `ArchiveDetailWire.archived`(ADR-0061 决定 4)。 */
|
|
17
16
|
export declare function childSubjectOf(child: ArchiveSubagentWire): ArchiveDetailSubject;
|
|
18
17
|
export declare function useArchiveDetailReader(input: {
|
|
19
18
|
deps: Pick<SessionDeleteRemote, 'archiveDetail'>;
|