@vibefield/rosetta-room 0.1.2 → 0.1.4
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 +82 -4
- package/dist/HistoryRoom.d.ts +15 -2
- package/dist/HistoryRoom.js +82 -25
- package/dist/TranscriptReader.d.ts +7 -0
- package/dist/TranscriptReader.js +4 -4
- package/dist/components/ColdStart.js +1 -1
- package/dist/components/IngestStatus.d.ts +13 -0
- package/dist/components/IngestStatus.js +39 -3
- package/dist/components/ListActivityNotice.d.ts +9 -1
- package/dist/components/ListActivityNotice.js +9 -2
- package/dist/components/SummaryPanels.d.ts +5 -0
- package/dist/components/SummaryPanels.js +16 -5
- package/dist/components/Transcript.d.ts +5 -0
- package/dist/components/Transcript.js +20 -5
- package/dist/components/artifacts/ArtifactLibrary.d.ts +14 -0
- package/dist/components/artifacts/ArtifactLibrary.js +156 -0
- package/dist/components/artifacts/content.d.ts +8 -0
- package/dist/components/artifacts/content.js +27 -0
- package/dist/components/artifacts/load-all.d.ts +5 -0
- package/dist/components/artifacts/load-all.js +31 -0
- package/dist/components/artifacts/preview.d.ts +4 -0
- package/dist/components/artifacts/preview.js +37 -0
- package/dist/components/artifacts/thumbnails.d.ts +13 -0
- package/dist/components/artifacts/thumbnails.js +43 -0
- package/dist/components/projects/ProjectList.d.ts +9 -3
- package/dist/components/projects/ProjectList.js +3 -3
- package/dist/components/projects/ProjectListItem.d.ts +9 -3
- package/dist/components/projects/ProjectListItem.js +18 -12
- package/dist/components/projects/ProjectsColumn.d.ts +4 -1
- package/dist/components/projects/ProjectsColumn.js +23 -9
- package/dist/components/search/SearchSheet.d.ts +39 -2
- package/dist/components/search/SearchSheet.js +81 -17
- package/dist/components/sessions/SessionList.d.ts +6 -1
- package/dist/components/sessions/SessionList.js +50 -20
- package/dist/components/sessions/SessionListItem.d.ts +3 -1
- package/dist/components/sessions/SessionListItem.js +17 -7
- package/dist/components/sessions/SessionsColumn.d.ts +3 -1
- package/dist/components/sessions/SessionsColumn.js +2 -2
- package/dist/components/sessions/session-display.d.ts +4 -1
- package/dist/components/sessions/session-display.js +13 -2
- package/dist/components/transcript/Attachments.js +6 -1
- package/dist/components/transcript/Document.d.ts +6 -1
- package/dist/components/transcript/Document.js +19 -6
- package/dist/components/transcript/ImportState.d.ts +35 -0
- package/dist/components/transcript/ImportState.js +86 -0
- package/dist/components/transcript/TranscriptLoading.js +15 -5
- package/dist/components/transcript/attachment-file-source.d.ts +2 -0
- package/dist/components/transcript/attachment-file-source.js +6 -6
- package/dist/components/transcript/attachment-gallery.d.ts +2 -1
- package/dist/components/transcript/attachment-gallery.js +2 -1
- package/dist/components/transcript/detail-parts.js +7 -6
- package/dist/components/transcript/timeline-meta-file-source.d.ts +2 -1
- package/dist/components/transcript/timeline-meta-file-source.js +45 -5
- package/dist/components/ui/EmptyState.d.ts +5 -1
- package/dist/components/ui/EmptyState.js +2 -2
- package/dist/components/ui/Meter.d.ts +8 -0
- package/dist/components/ui/Meter.js +9 -0
- package/dist/components/ui/SegmentedControl.d.ts +2 -0
- package/dist/components/ui/SegmentedControl.js +1 -1
- package/dist/components/ui/Veil.d.ts +2 -1
- package/dist/components/ui/Veil.js +9 -2
- package/dist/components/ui/index.d.ts +2 -0
- package/dist/components/ui/index.js +1 -0
- package/dist/fixtures/cold-import-corpus.d.ts +76 -0
- package/dist/fixtures/cold-import-corpus.js +349 -0
- package/dist/fixtures/cold-import-daemon.d.ts +25 -0
- package/dist/fixtures/cold-import-daemon.js +82 -0
- package/dist/fixtures/cold-import-schedule.d.ts +74 -0
- package/dist/fixtures/cold-import-schedule.js +191 -0
- package/dist/fixtures/cold-import.d.ts +151 -0
- package/dist/fixtures/cold-import.js +786 -0
- package/dist/fixtures/index.d.ts +2 -0
- package/dist/fixtures/index.js +21 -2
- package/dist/lib/activity-order.d.ts +15 -0
- package/dist/lib/activity-order.js +24 -1
- package/dist/lib/conversation-readiness.d.ts +48 -0
- package/dist/lib/conversation-readiness.js +149 -0
- package/dist/lib/figure-order.d.ts +35 -0
- package/dist/lib/figure-order.js +68 -0
- package/dist/lib/hooks.d.ts +32 -10
- package/dist/lib/hooks.js +118 -54
- package/dist/lib/image-media.d.ts +12 -2
- package/dist/lib/image-media.js +40 -6
- package/dist/lib/import-state.d.ts +98 -0
- package/dist/lib/import-state.js +129 -0
- package/dist/lib/ingest-activity.d.ts +51 -0
- package/dist/lib/ingest-activity.js +109 -10
- package/dist/lib/model.d.ts +16 -0
- package/dist/lib/model.js +27 -1
- package/dist/lib/search-sheet.d.ts +43 -0
- package/dist/lib/search-sheet.js +56 -7
- package/dist/lib/session-activity.d.ts +4 -1
- package/dist/lib/session-activity.js +4 -1
- package/dist/lib/title-search.d.ts +82 -0
- package/dist/lib/title-search.js +194 -0
- package/dist/lib/transcript/images.js +2 -2
- package/dist/lib/transcript/sittings.d.ts +7 -4
- package/dist/lib/transcript/sittings.js +14 -8
- package/dist/lib/use-deferred-list-order.d.ts +6 -0
- package/dist/lib/use-deferred-list-order.js +8 -1
- package/dist/lib/use-ingest-activity.d.ts +5 -1
- package/dist/lib/use-ingest-activity.js +54 -18
- package/dist/ports.d.ts +15 -2
- package/dist/styles/artifacts.css +66 -0
- package/dist/styles/history-room.css +1 -0
- package/dist/styles/ingest.css +26 -3
- package/dist/styles/room.css +15 -0
- package/dist/styles/search.css +17 -0
- package/package.json +2 -2
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { projectKey } from "./model.js";
|
|
2
|
+
import { compareSessionActivity } from "./session-activity.js";
|
|
3
|
+
/** The line the sheet prints under title matches during the import. */
|
|
4
|
+
export const FULL_TEXT_PENDING = "Full-text search arrives when the import finishes.";
|
|
5
|
+
/** …after publication, while the index builds its first generation. */
|
|
6
|
+
export const FULL_TEXT_BUILDING = "Full-text search arrives when its index is built.";
|
|
7
|
+
/** …and when the index failed. */
|
|
8
|
+
export const FULL_TEXT_FAILED = "Full-text search is unavailable.";
|
|
9
|
+
/** The line under title matches: what full text is waiting for, never a
|
|
10
|
+
* time. Before publication the import is the gate; after it, the index. */
|
|
11
|
+
export function titlesNote(readiness, canonicalReady) {
|
|
12
|
+
if (canonicalReady === false)
|
|
13
|
+
return FULL_TEXT_PENDING;
|
|
14
|
+
return readiness === "failed" ? FULL_TEXT_FAILED : FULL_TEXT_BUILDING;
|
|
15
|
+
}
|
|
16
|
+
/** How many titles the sheet can search: top-level conversations that have a
|
|
17
|
+
* name to match. Metadata-only placeholders carry none, so they never count
|
|
18
|
+
* — the same unit the import card counts in (conversations). */
|
|
19
|
+
export function searchableTitleCount(sessions) {
|
|
20
|
+
let count = 0;
|
|
21
|
+
for (const session of sessions) {
|
|
22
|
+
if (session.parent_session_id === null && sessionTitleText(session) !== null)
|
|
23
|
+
count += 1;
|
|
24
|
+
}
|
|
25
|
+
return count;
|
|
26
|
+
}
|
|
27
|
+
/** How many title matches the sheet lists; the count says when there are more. */
|
|
28
|
+
export const TITLE_MATCH_LIMIT = 50;
|
|
29
|
+
/**
|
|
30
|
+
* Full text cannot answer: the canonical projection is unpublished (the
|
|
31
|
+
* daemon answers every query with zero hits and `building`), the detached
|
|
32
|
+
* index has no generation yet (`building`), or the index failed (it serves
|
|
33
|
+
* no hits; crates/search/src/sidecar.rs `serves_hits`). A catching-up index
|
|
34
|
+
* does answer — partially — and keeps the ordinary sheet. Unknown (null) is
|
|
35
|
+
* no claim either way.
|
|
36
|
+
*/
|
|
37
|
+
export function fullTextUnavailable(readiness, canonicalReady) {
|
|
38
|
+
return canonicalReady === false || readiness === "building" || readiness === "failed";
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Titles stand in while full text cannot answer, and after it can, until
|
|
42
|
+
* the answer on screen is one full text gave. The zero hits an unpublished
|
|
43
|
+
* index answered with (`building`) would otherwise read as "nothing matched"
|
|
44
|
+
* in the moment between the import finishing and the re-asked query landing.
|
|
45
|
+
*/
|
|
46
|
+
export function titlesStandIn(readiness, canonicalReady, response) {
|
|
47
|
+
return fullTextUnavailable(readiness, canonicalReady) || response?.state.readiness === "building";
|
|
48
|
+
}
|
|
49
|
+
/* ── folding: case- and accent-insensitive, the way the index tokenizes ── */
|
|
50
|
+
const ASCII = /^[\x00-\x7f]*$/;
|
|
51
|
+
const MARKS = /\p{M}+/gu;
|
|
52
|
+
function foldChar(ch) {
|
|
53
|
+
return ch.normalize("NFKD").replace(MARKS, "").toLowerCase();
|
|
54
|
+
}
|
|
55
|
+
function foldUncached(text) {
|
|
56
|
+
if (ASCII.test(text))
|
|
57
|
+
return text.toLowerCase();
|
|
58
|
+
// Code point by code point, so a match maps back onto the original title
|
|
59
|
+
// (`markTitle`) through exactly the same fold.
|
|
60
|
+
let out = "";
|
|
61
|
+
for (const ch of text)
|
|
62
|
+
out += foldChar(ch);
|
|
63
|
+
return out;
|
|
64
|
+
}
|
|
65
|
+
// Titles repeat across every metadata update of an import; folding is a pure
|
|
66
|
+
// function of the text, so a bounded memo keeps keystrokes O(sessions) cheap.
|
|
67
|
+
const FOLD_CACHE_CAP = 65_536;
|
|
68
|
+
const folded = new Map();
|
|
69
|
+
/** Lower-cased, accents and other combining marks removed. */
|
|
70
|
+
export function foldText(text) {
|
|
71
|
+
const hit = folded.get(text);
|
|
72
|
+
if (hit !== undefined)
|
|
73
|
+
return hit;
|
|
74
|
+
const value = foldUncached(text);
|
|
75
|
+
if (folded.size >= FOLD_CACHE_CAP)
|
|
76
|
+
folded.clear();
|
|
77
|
+
folded.set(text, value);
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The query's terms, folded: each word, and a quoted phrase as one term —
|
|
82
|
+
* the sheet's printed grammar ("every word must match", quotes for a
|
|
83
|
+
* phrase), read loosely. A quote left open is just part of a word here.
|
|
84
|
+
* Duplicates fold away; order is kept.
|
|
85
|
+
*/
|
|
86
|
+
export function titleTerms(query) {
|
|
87
|
+
const terms = [];
|
|
88
|
+
for (const match of query.matchAll(/"([^"]*)"|(\S+)/g)) {
|
|
89
|
+
const raw = match[1] ?? match[2].replace(/^"+|"+$/g, "");
|
|
90
|
+
const term = foldText(raw.trim());
|
|
91
|
+
if (term !== "" && !terms.includes(term))
|
|
92
|
+
terms.push(term);
|
|
93
|
+
}
|
|
94
|
+
return terms;
|
|
95
|
+
}
|
|
96
|
+
/** The name a session's row shows, when it has one to search. */
|
|
97
|
+
export function sessionTitleText(session) {
|
|
98
|
+
return session.title ?? session.summary;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The title as parts, every occurrence of every term marked — the same
|
|
102
|
+
* shape `parseSnippet` gives a full-text hit, so both draw alike.
|
|
103
|
+
*/
|
|
104
|
+
export function markTitle(title, terms) {
|
|
105
|
+
let foldedTitle = "";
|
|
106
|
+
const from = [];
|
|
107
|
+
const to = [];
|
|
108
|
+
for (let at = 0; at < title.length;) {
|
|
109
|
+
const ch = String.fromCodePoint(title.codePointAt(at));
|
|
110
|
+
const fold = ASCII.test(ch) ? ch.toLowerCase() : foldChar(ch);
|
|
111
|
+
for (let unit = 0; unit < fold.length; unit += 1) {
|
|
112
|
+
from.push(at);
|
|
113
|
+
to.push(at + ch.length);
|
|
114
|
+
}
|
|
115
|
+
foldedTitle += fold;
|
|
116
|
+
at += ch.length;
|
|
117
|
+
}
|
|
118
|
+
const ranges = [];
|
|
119
|
+
for (const term of terms) {
|
|
120
|
+
for (let at = foldedTitle.indexOf(term); at !== -1; at = foldedTitle.indexOf(term, at + 1)) {
|
|
121
|
+
ranges.push([from[at], to[at + term.length - 1]]);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
ranges.sort((left, right) => left[0] - right[0] || left[1] - right[1]);
|
|
125
|
+
const merged = [];
|
|
126
|
+
for (const range of ranges) {
|
|
127
|
+
const last = merged[merged.length - 1];
|
|
128
|
+
if (last !== undefined && range[0] <= last[1])
|
|
129
|
+
last[1] = Math.max(last[1], range[1]);
|
|
130
|
+
else
|
|
131
|
+
merged.push([range[0], range[1]]);
|
|
132
|
+
}
|
|
133
|
+
const parts = [];
|
|
134
|
+
let cursor = 0;
|
|
135
|
+
for (const [start, end] of merged) {
|
|
136
|
+
if (start > cursor)
|
|
137
|
+
parts.push({ text: title.slice(cursor, start), mark: false });
|
|
138
|
+
parts.push({ text: title.slice(start, end), mark: true });
|
|
139
|
+
cursor = end;
|
|
140
|
+
}
|
|
141
|
+
if (cursor < title.length)
|
|
142
|
+
parts.push({ text: title.slice(cursor), mark: false });
|
|
143
|
+
return parts;
|
|
144
|
+
}
|
|
145
|
+
export function titleOptionId(sessionId) {
|
|
146
|
+
return `ah-sheet-title-${sessionId}`;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Top-level threads whose title contains every term, newest known activity
|
|
150
|
+
* first (the session list's own tie-breaks), capped at `limit`. Threads in a
|
|
151
|
+
* project the room does not show are left out, as full-text hits are.
|
|
152
|
+
*/
|
|
153
|
+
export function matchSessionTitles(query, sessions, projectsById, scope, limit = TITLE_MATCH_LIMIT) {
|
|
154
|
+
const terms = titleTerms(query);
|
|
155
|
+
if (terms.length === 0)
|
|
156
|
+
return { matches: [], total: 0 };
|
|
157
|
+
const found = [];
|
|
158
|
+
for (const session of sessions) {
|
|
159
|
+
if (session.parent_session_id !== null)
|
|
160
|
+
continue;
|
|
161
|
+
const title = sessionTitleText(session);
|
|
162
|
+
if (title === null)
|
|
163
|
+
continue;
|
|
164
|
+
const key = projectKey(session);
|
|
165
|
+
if (scope.project !== null && key !== scope.project)
|
|
166
|
+
continue;
|
|
167
|
+
if (scope.agent !== null && scope.runtimeKind(session.runtime_id) !== scope.agent)
|
|
168
|
+
continue;
|
|
169
|
+
const text = foldText(title);
|
|
170
|
+
if (!terms.every((term) => text.includes(term)))
|
|
171
|
+
continue;
|
|
172
|
+
const project = projectsById.get(key);
|
|
173
|
+
if (project === undefined)
|
|
174
|
+
continue;
|
|
175
|
+
found.push({ session, project, title });
|
|
176
|
+
}
|
|
177
|
+
found.sort((left, right) => compareSessionActivity(left.session, right.session));
|
|
178
|
+
const matches = found.slice(0, Math.max(0, limit)).map(({ session, project, title }, index) => ({
|
|
179
|
+
id: titleOptionId(session.id),
|
|
180
|
+
index,
|
|
181
|
+
session,
|
|
182
|
+
project,
|
|
183
|
+
parts: markTitle(title, terms),
|
|
184
|
+
}));
|
|
185
|
+
return { matches, total: found.length };
|
|
186
|
+
}
|
|
187
|
+
/** `3 titles`, or `first 50 of 132 titles` when the list is capped. */
|
|
188
|
+
export function titleCountLabel(result) {
|
|
189
|
+
const total = result.total.toLocaleString("en-US");
|
|
190
|
+
const noun = result.total === 1 ? "title" : "titles";
|
|
191
|
+
return result.matches.length < result.total
|
|
192
|
+
? `first ${result.matches.length.toLocaleString("en-US")} of ${total} ${noun}`
|
|
193
|
+
: `${total} ${noun}`;
|
|
194
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { projectAction } from "./families.js";
|
|
2
2
|
import { readAttachments } from "./turns.js";
|
|
3
3
|
import { resourceLabel, splitPath } from "./vocabulary.js";
|
|
4
|
-
import {
|
|
4
|
+
import { isRecordedImageAsset } from "../image-media.js";
|
|
5
5
|
function resourcePath(resource) {
|
|
6
6
|
const label = resourceLabel(resource);
|
|
7
7
|
return { label, ...splitPath(label), resource };
|
|
@@ -21,7 +21,7 @@ function rowImages(row) {
|
|
|
21
21
|
: [];
|
|
22
22
|
return [...recorded, ...paths.flatMap((path, index) => {
|
|
23
23
|
const resource = path.resource;
|
|
24
|
-
if (resource.type !== "asset" || !
|
|
24
|
+
if (resource.type !== "asset" || !isRecordedImageAsset(resource.asset))
|
|
25
25
|
return [];
|
|
26
26
|
const asset = resource.asset;
|
|
27
27
|
const key = `${row.session_id}:${row.timeline_id}:resource:${index}`;
|
|
@@ -5,10 +5,13 @@ export declare const SITTING_PAUSE_MS: number;
|
|
|
5
5
|
* compact configuration group. Conversational prompts never use this rule. */
|
|
6
6
|
export declare const PROMPT_CLUSTER_MS: number;
|
|
7
7
|
/**
|
|
8
|
-
* The viewer-local day a timestamp falls in, as `YYYY-MM-DD
|
|
9
|
-
* `lib/model.ts`'s `getCalendarDayKey`
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* The viewer-local day a timestamp falls in, as `YYYY-MM-DD`, by the offset the
|
|
9
|
+
* viewer's zone had at that moment. `lib/model.ts`'s `getCalendarDayKey` is a
|
|
10
|
+
* different key on purpose: it uses today's offset for every day, because the
|
|
11
|
+
* daemon buckets the heatmap by the one `offset_minutes` it is sent. A
|
|
12
|
+
* transcript is cut on the client alone, so its days are the stamps' own.
|
|
13
|
+
* Kept here rather than imported, because that module pulls in JSX through the
|
|
14
|
+
* agent marks, and this one must stay importable by a plain node test.
|
|
12
15
|
*/
|
|
13
16
|
export declare function calendarDayKey(timestamp: number): string;
|
|
14
17
|
/**
|
|
@@ -5,18 +5,24 @@ export const SITTING_PAUSE_MS = 15 * 60_000;
|
|
|
5
5
|
* compact configuration group. Conversational prompts never use this rule. */
|
|
6
6
|
export const PROMPT_CLUSTER_MS = 5 * 60_000;
|
|
7
7
|
const MINUTES_TO_MS = 60_000;
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The viewer's offset AT `timestamp`, minutes east of UTC. A stamp on the other
|
|
10
|
+
* side of a daylight-saving change from today has its own offset, not today's.
|
|
11
|
+
*/
|
|
12
|
+
function viewerUtcOffsetMinutes(timestamp) {
|
|
13
|
+
return -new Date(timestamp).getTimezoneOffset();
|
|
11
14
|
}
|
|
12
15
|
/**
|
|
13
|
-
* The viewer-local day a timestamp falls in, as `YYYY-MM-DD
|
|
14
|
-
* `lib/model.ts`'s `getCalendarDayKey`
|
|
15
|
-
*
|
|
16
|
-
*
|
|
16
|
+
* The viewer-local day a timestamp falls in, as `YYYY-MM-DD`, by the offset the
|
|
17
|
+
* viewer's zone had at that moment. `lib/model.ts`'s `getCalendarDayKey` is a
|
|
18
|
+
* different key on purpose: it uses today's offset for every day, because the
|
|
19
|
+
* daemon buckets the heatmap by the one `offset_minutes` it is sent. A
|
|
20
|
+
* transcript is cut on the client alone, so its days are the stamps' own.
|
|
21
|
+
* Kept here rather than imported, because that module pulls in JSX through the
|
|
22
|
+
* agent marks, and this one must stay importable by a plain node test.
|
|
17
23
|
*/
|
|
18
24
|
export function calendarDayKey(timestamp) {
|
|
19
|
-
const date = new Date(timestamp + viewerUtcOffsetMinutes() * MINUTES_TO_MS);
|
|
25
|
+
const date = new Date(timestamp + viewerUtcOffsetMinutes(timestamp) * MINUTES_TO_MS);
|
|
20
26
|
const month = String(date.getUTCMonth() + 1).padStart(2, "0");
|
|
21
27
|
const day = String(date.getUTCDate()).padStart(2, "0");
|
|
22
28
|
return `${date.getUTCFullYear()}-${month}-${day}`;
|
|
@@ -4,12 +4,18 @@ export interface ListPosition {
|
|
|
4
4
|
readonly day: number | null;
|
|
5
5
|
/** Which of a host's sections the row is drawn in (R3); absent without them. */
|
|
6
6
|
readonly section?: number;
|
|
7
|
+
/** Drawn in one of the import's not-imported groups; absent otherwise. */
|
|
8
|
+
readonly pending?: boolean;
|
|
9
|
+
/** That group is the top one, "Still importing"; absent otherwise. */
|
|
10
|
+
readonly importing?: boolean;
|
|
7
11
|
}
|
|
8
12
|
/** Hold geometry, never row data. Pointer, keyboard and scroll activity all
|
|
9
13
|
* protect the same snapshot, including day membership and new insertions. */
|
|
10
14
|
export declare function useDeferredListOrder(desired: readonly ListPosition[], scope: string): {
|
|
11
15
|
items: readonly ListPosition[];
|
|
12
16
|
pending: boolean;
|
|
17
|
+
/** Held not-imported rows the wanted order draws as imported. */
|
|
18
|
+
arrivals: import("./import-state.js").ImportArrivals | null;
|
|
13
19
|
scrollRef: import("react").RefObject<HTMLDivElement | null>;
|
|
14
20
|
hostProps: {
|
|
15
21
|
onPointerEnter: (event: PointerEvent<HTMLDivElement>) => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
2
|
+
import { importArrivals } from "./import-state.js";
|
|
2
3
|
const idle = (scope) => ({
|
|
3
4
|
scope, hovered: false, focused: false, pressed: false, away: false, scrolling: false,
|
|
4
5
|
});
|
|
@@ -107,9 +108,15 @@ export function useDeferredListOrder(desired, scope) {
|
|
|
107
108
|
timer.current = null;
|
|
108
109
|
}, 180);
|
|
109
110
|
};
|
|
111
|
+
const pending = current.signature !== wanted;
|
|
112
|
+
// The rows at the top of the reader's view, as the last commit or scroll
|
|
113
|
+
// left them: what "below" means for the import's arrivals.
|
|
114
|
+
const anchorIds = anchor.current?.scope === scope ? anchor.current.rows.map(row => row.id) : [];
|
|
110
115
|
return {
|
|
111
116
|
items: current.items,
|
|
112
|
-
pending
|
|
117
|
+
pending,
|
|
118
|
+
/** Held not-imported rows the wanted order draws as imported. */
|
|
119
|
+
arrivals: pending ? importArrivals(current.items, desired, anchorIds) : null,
|
|
113
120
|
scrollRef,
|
|
114
121
|
hostProps: {
|
|
115
122
|
onPointerEnter: (event) => {
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import type { ActivityFeed, IngestActivity } from "./ingest-activity.js";
|
|
2
|
-
|
|
2
|
+
import type { ConversationReadiness } from "./conversation-readiness.js";
|
|
3
|
+
export declare const LEAVING_MS = 360;
|
|
4
|
+
/** `conversations` is the room's fold of the catalog it draws the rows from,
|
|
5
|
+
* so the card's counts change in the same render as the rows. */
|
|
6
|
+
export declare function useIngestActivity(given: ActivityFeed, conversations?: ConversationReadiness | null): IngestActivity | null;
|
|
@@ -1,34 +1,70 @@
|
|
|
1
|
-
import { useEffect,
|
|
2
|
-
import { activityIdentity, activityPhase, progressBytes, progressDuration, sampleActivity } from "./ingest-activity.js";
|
|
3
|
-
|
|
1
|
+
import { useEffect, useMemo, useState } from "react";
|
|
2
|
+
import { activityIdentity, activityPhase, progressBytes, progressDuration, resumedRun, sampleActivity } from "./ingest-activity.js";
|
|
3
|
+
/** How long "Search ready" stays, and how long its fold takes (ingest.css,
|
|
4
|
+
* `.ah-ingest-fold`), before the card goes. */
|
|
5
|
+
const COMPLETION_MS = 5_000;
|
|
6
|
+
export const LEAVING_MS = 360;
|
|
7
|
+
/** `conversations` is the room's fold of the catalog it draws the rows from,
|
|
8
|
+
* so the card's counts change in the same render as the rows. */
|
|
9
|
+
export function useIngestActivity(given, conversations = null) {
|
|
10
|
+
// A resumed build is known by its runtimes' course, or, from a daemon that
|
|
11
|
+
// names none, by the restoring phase it passed through; the mark outlives
|
|
12
|
+
// that phase until the import goes live.
|
|
13
|
+
const [resumedKey, setResumedKey] = useState(null);
|
|
14
|
+
const nextResumedKey = resumedRun(resumedKey, given);
|
|
15
|
+
if (nextResumedKey !== resumedKey)
|
|
16
|
+
setResumedKey(nextResumedKey);
|
|
17
|
+
const resumed = nextResumedKey !== null;
|
|
18
|
+
const polled = useMemo(() => (resumed ? { ...given, resumed } : given), [given, resumed]);
|
|
19
|
+
// The counts move with every metadata delivery; the samples and the clock
|
|
20
|
+
// follow the status poll alone, so a delivery costs the room no second render.
|
|
21
|
+
const feed = useMemo(() => (conversations === null ? polled : { ...polled, conversations }), [polled, conversations]);
|
|
4
22
|
const phase = activityPhase(feed);
|
|
5
23
|
const [samples, setSamples] = useState(null);
|
|
6
24
|
const [now, setNow] = useState(Date.now);
|
|
7
|
-
|
|
8
|
-
|
|
25
|
+
// The end: "Search ready" shows on one line for five seconds, then the
|
|
26
|
+
// card folds its height away (`leaving`), then it goes. Only a run seen
|
|
27
|
+
// working ends this way; a room opened on a finished archive shows none.
|
|
28
|
+
const [sawWork, setSawWork] = useState(false);
|
|
29
|
+
const [end, setEnd] = useState(null);
|
|
9
30
|
const key = phase?.key;
|
|
31
|
+
if (key !== undefined && key !== "ready" && key !== "paused") {
|
|
32
|
+
if (!sawWork)
|
|
33
|
+
setSawWork(true);
|
|
34
|
+
if (end !== null)
|
|
35
|
+
setEnd(null);
|
|
36
|
+
}
|
|
37
|
+
// Decided in the render that first draws "ready", so the card never
|
|
38
|
+
// blinks out for a frame on its way there.
|
|
39
|
+
if (key === "ready" && end === null)
|
|
40
|
+
setEnd(sawWork ? "shown" : "gone");
|
|
10
41
|
useEffect(() => {
|
|
11
|
-
const current = activityPhase(
|
|
42
|
+
const current = activityPhase(polled);
|
|
12
43
|
if (current)
|
|
13
|
-
setSamples((previous) => sampleActivity(previous,
|
|
44
|
+
setSamples((previous) => sampleActivity(previous, polled, current));
|
|
14
45
|
setNow(Date.now());
|
|
15
|
-
}, [
|
|
46
|
+
}, [polled]);
|
|
16
47
|
useEffect(() => {
|
|
17
|
-
if (
|
|
18
|
-
sawWork.current = true;
|
|
19
|
-
if (key !== "ready")
|
|
48
|
+
if (end !== "shown" && end !== "leaving")
|
|
20
49
|
return;
|
|
21
|
-
|
|
22
|
-
|
|
50
|
+
const timer = window.setTimeout(() => {
|
|
51
|
+
if (end === "shown")
|
|
52
|
+
setEnd("leaving");
|
|
53
|
+
else {
|
|
54
|
+
setEnd("gone");
|
|
55
|
+
setSawWork(false);
|
|
56
|
+
}
|
|
57
|
+
}, end === "shown" ? COMPLETION_MS : LEAVING_MS);
|
|
23
58
|
return () => window.clearTimeout(timer);
|
|
24
|
-
}, [
|
|
59
|
+
}, [end]);
|
|
60
|
+
const finished = key === "ready" && end !== "shown" && end !== "leaving";
|
|
25
61
|
useEffect(() => {
|
|
26
|
-
if (!key ||
|
|
62
|
+
if (!key || finished)
|
|
27
63
|
return;
|
|
28
64
|
const timer = window.setInterval(() => setNow(Date.now()), 1_000);
|
|
29
65
|
return () => window.clearInterval(timer);
|
|
30
|
-
}, [key,
|
|
31
|
-
if (!phase ||
|
|
66
|
+
}, [key, finished]);
|
|
67
|
+
if (!phase || finished)
|
|
32
68
|
return null;
|
|
33
69
|
const sinceAnswer = Math.max(0, now - (feed.receivedAt ?? now));
|
|
34
70
|
const elapsed = `${progressDuration(feed.uptimeMs + (phase.active ? sinceAnswer : 0))} elapsed`;
|
|
@@ -45,5 +81,5 @@ export function useIngestActivity(feed) {
|
|
|
45
81
|
footer = `Connected · No new counts for ${progressDuration(sinceChange)}`;
|
|
46
82
|
else if (!phase.active)
|
|
47
83
|
footer = key === "ready" ? "Complete" : key === "paused" ? "Paused" : key === "failed" ? "Stopped" : "Ready to browse";
|
|
48
|
-
return { phase, feed, footer, elapsed };
|
|
84
|
+
return { phase, feed, footer, elapsed, leaving: key === "ready" && end === "leaving" };
|
|
49
85
|
}
|
package/dist/ports.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AssetRef, CollaborationSubscriptionHandlers, CommandResponse, DayUsageResponse, ImageVariant, IngestProgress, Ingestion, IngestionCommand, MetaSubscriptionHandlers, SearchBuildProgress, SearchReadiness, SearchResponse, SessionSubscriptionHandlers, TimelineEntry, TimelineMetaPlanSource, TimelinePage, UsageResponse } from "@vibefield/rosetta-protocol";
|
|
1
|
+
import type { AssetRef, ArtifactListRequest, ArtifactPage, CollaborationSubscriptionHandlers, CommandResponse, DayUsageResponse, ImageVariant, IngestProgress, Ingestion, IngestionCommand, MetaSubscriptionHandlers, SearchBuildProgress, SearchReadiness, SearchResponse, SessionSubscriptionHandlers, TimelineEntry, TimelineMetaPlanSource, TimelinePage, UsageResponse } from "@vibefield/rosetta-protocol";
|
|
2
2
|
import type { ProjectStats } from "./lib/model.js";
|
|
3
3
|
/** A live subscription the room can end. */
|
|
4
4
|
export interface Closable {
|
|
@@ -59,6 +59,12 @@ export interface CatalogPort {
|
|
|
59
59
|
/** One day of that project, hour by hour. */
|
|
60
60
|
dayUsage(projectId: string, day: string, offsetMinutes: number, signal?: AbortSignal): Promise<DayUsageResponse>;
|
|
61
61
|
search(request: CatalogSearch, signal?: AbortSignal): Promise<SearchResponse>;
|
|
62
|
+
/** Explicitly presented HTML deliverables across the index. Optional for
|
|
63
|
+
* hosts that expose only a session or use an older catalog. */
|
|
64
|
+
readonly artifacts?: {
|
|
65
|
+
list(request: ArtifactListRequest, signal?: AbortSignal): Promise<ArtifactPage>;
|
|
66
|
+
read(sessionId: string, publicationId: string, signal?: AbortSignal): Promise<Uint8Array>;
|
|
67
|
+
};
|
|
62
68
|
/** Advisory: read this still-queued session next. Optional — a grant never
|
|
63
69
|
* opens a write, so only a host that holds the daemon's bearer offers it;
|
|
64
70
|
* without it the index keeps its own order. */
|
|
@@ -88,6 +94,7 @@ export interface SessionClient {
|
|
|
88
94
|
command(sessionId: string, timelineId: string, signal?: AbortSignal): Promise<CommandResponse>;
|
|
89
95
|
readFileTarget(sessionId: string, timelineId: string, targetIndex: number, signal?: AbortSignal): Promise<Uint8Array>;
|
|
90
96
|
readPlan(sessionId: string, source: TimelineMetaPlanSource, signal?: AbortSignal): Promise<Uint8Array>;
|
|
97
|
+
readArtifact?(sessionId: string, publicationId: string, signal?: AbortSignal): Promise<Uint8Array>;
|
|
91
98
|
readTextAsset(asset: AssetRef, signal?: AbortSignal): Promise<string>;
|
|
92
99
|
readAsset(asset: AssetRef, signal?: AbortSignal): Promise<Uint8Array>;
|
|
93
100
|
}
|
|
@@ -184,6 +191,9 @@ export interface HostPort {
|
|
|
184
191
|
/** Hand the exact HTML/SVG bytes to the chosen installed browser. Omitting
|
|
185
192
|
* the id retains the default-browser action for hosts without discovery. */
|
|
186
193
|
openInBrowser(name: string, bytes: Uint8Array, browserId?: string): Promise<boolean>;
|
|
194
|
+
/** Render one bounded HTML document into a cached static PNG data URL.
|
|
195
|
+
* Hosts without a screenshot renderer leave the grid preview unavailable. */
|
|
196
|
+
artifactThumbnail?(html: string): Promise<string | null>;
|
|
187
197
|
/** Re-read installed browsers. Absent on hosts with only a default action. */
|
|
188
198
|
browsers?(): Promise<readonly InstalledBrowser[]>;
|
|
189
199
|
/** One site's own icon as an image URL, or null for every honest no — a
|
|
@@ -204,7 +214,10 @@ export interface AssetSource {
|
|
|
204
214
|
* and answers an object URL — a promise while it fetches — bounding and
|
|
205
215
|
* revoking what it made. The room asks on every mount and every retry, so
|
|
206
216
|
* an evicted URL is asked for again, never reused, and a host must not
|
|
207
|
-
* keep a failure.
|
|
217
|
+
* keep a failure. Every variant, `full` included, names a WebP the daemon
|
|
218
|
+
* encoded (`RosettaClient.imageAssetUrl`): a recorded original's plain
|
|
219
|
+
* member URL returns its recorded bytes, for opening or saving, and is
|
|
220
|
+
* never an image's address.
|
|
208
221
|
*/
|
|
209
222
|
imageAssetUrl(asset: AssetRef, variant: ImageVariant): AssetUrl;
|
|
210
223
|
/** The address that names one stored attachment member, or null when the
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
.ah-artifacts-launcher { display: flex; align-items: center; gap: 5px; margin-left: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--vf-hairline); border-radius: 999px; background: var(--vf-fill); color: var(--vf-text-secondary); font-size: 12px; white-space: nowrap; -webkit-app-region: no-drag; }
|
|
2
|
+
.ah-artifacts-launcher svg { width: 16px; height: 16px; }
|
|
3
|
+
.ah-artifacts-launcher:hover { background: var(--vf-fill-hover); color: var(--vf-text-primary); }
|
|
4
|
+
.ah-artifacts { position: fixed; z-index: 61; inset: 5vh 4vw; max-width: 1320px; margin: auto; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--vf-hairline-strong); border-radius: var(--vf-radius-card, 14px); background: var(--vf-sheet-surface); color: var(--vf-text-primary); font-family: var(--vf-font-sans, system-ui, sans-serif); box-shadow: 0 24px 80px #0003; -webkit-app-region: no-drag; }
|
|
5
|
+
.ah-artifacts button, .ah-artifacts input, .ah-artifacts select { font: inherit; }
|
|
6
|
+
.ah-artifacts button, .ah-artifacts select { cursor: pointer; }
|
|
7
|
+
.ah-artifacts button:disabled { cursor: default; opacity: .5; }
|
|
8
|
+
.ah-artifacts button:focus-visible, .ah-artifacts input:focus-visible, .ah-artifacts select:focus-visible { outline: 2px solid var(--vf-select); outline-offset: -2px; }
|
|
9
|
+
.ah-artifacts__head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--vf-hairline); }
|
|
10
|
+
.ah-artifacts__head > svg { width: 28px; height: 28px; color: var(--vf-text-secondary); }
|
|
11
|
+
.ah-artifacts__head h2 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
|
|
12
|
+
.ah-artifacts__head p { margin: 0; font-size: 12px; color: var(--vf-text-secondary); }
|
|
13
|
+
.ah-artifacts__close { margin-left: auto; border: 0; border-radius: 8px; width: 30px; height: 30px; background: var(--vf-fill); color: inherit; font-size: 22px !important; }
|
|
14
|
+
.ah-artifacts__filters { display: flex; gap: 8px; padding: 12px 20px; align-items: center; border-bottom: 1px solid var(--vf-hairline); font-size: 12px; }
|
|
15
|
+
.ah-artifacts__filters input { flex: 1; min-width: 120px; }
|
|
16
|
+
.ah-artifacts__filters strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
17
|
+
.ah-artifacts__filters :is(input, select, button), .ah-artifacts__detailhead button, .ah-artifacts__toolbar button, .ah-artifacts__message button { border: 1px solid var(--vf-hairline); border-radius: 7px; background: var(--vf-fill); color: inherit; padding: 6px 9px; }
|
|
18
|
+
.ah-artifacts__filters select { max-width: 200px; }
|
|
19
|
+
.ah-artifacts__body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
|
|
20
|
+
.ah-artifacts__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); grid-auto-rows: max-content; align-content: start; gap: 18px; flex: 1; overflow: auto; padding: 20px; }
|
|
21
|
+
.ah-artifacts__list[hidden] { display: none; }
|
|
22
|
+
.ah-artifacts__list > :is(.ah-artifacts__empty, .ah-artifacts__message) { grid-column: 1 / -1; }
|
|
23
|
+
.ah-artifacts__item { display: flex; flex-direction: column; border: 1px solid var(--vf-hairline); border-radius: 12px; overflow: hidden; min-width: 0; background: var(--vf-fill); }
|
|
24
|
+
.ah-artifacts__item:hover { background: var(--vf-fill); }
|
|
25
|
+
.ah-artifacts__item[data-selected] { background: var(--vf-fill-hover); border-color: var(--vf-hairline-strong); }
|
|
26
|
+
.ah-artifacts__select { display: flex; flex-direction: column; flex-shrink: 0; gap: 7px; width: 100%; padding: 0 0 14px; border: 0; text-align: left; background: transparent; color: inherit; font-size: 12px !important; }
|
|
27
|
+
.ah-artifacts__select > :not(.ah-artifacts__thumbnail) { margin-inline: 14px; max-width: calc(100% - 28px); }
|
|
28
|
+
.ah-artifacts__thumbnail { display: block; position: relative; flex-shrink: 0; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #fff; border-bottom: 1px solid var(--vf-hairline); margin-bottom: 8px; pointer-events: none; }
|
|
29
|
+
.ah-artifacts__thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
|
|
30
|
+
.ah-artifacts__placeholder { display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--vf-text-tertiary); background: var(--vf-sheet-surface); font-size: 12px; }
|
|
31
|
+
.ah-artifacts__placeholder svg { width: 32px; height: 32px; opacity: .6; }
|
|
32
|
+
.ah-artifacts__cardactions { display: flex; flex-shrink: 0; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 14px; margin-top: auto; border-top: 1px solid var(--vf-hairline); }
|
|
33
|
+
.ah-artifacts__cardactions :is(button, a) { border: 0; padding: 0; background: transparent; color: var(--vf-text-secondary); text-decoration: none; font-size: 11px !important; }
|
|
34
|
+
.ah-artifacts a:hover, .ah-artifacts__cardactions button:hover { color: var(--vf-text-primary); text-decoration: underline; }
|
|
35
|
+
.ah-artifacts a:focus-visible { outline: 2px solid var(--vf-select); outline-offset: 3px; }
|
|
36
|
+
.ah-artifacts__itemtitle { display: flex; align-items: center; gap: 7px; max-width: 100%; }
|
|
37
|
+
.ah-artifacts__itemtitle svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--vf-text-secondary); }
|
|
38
|
+
.ah-artifacts__itemtitle strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 550; }
|
|
39
|
+
.ah-artifacts__filename { display: block; max-width: 100%; font-family: var(--vf-font-mono, monospace); font-size: 11px; color: var(--vf-text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
40
|
+
.ah-artifacts__itemmeta { display: flex; align-items: center; gap: 5px; color: var(--vf-text-secondary); font-size: 11px; }
|
|
41
|
+
.ah-artifacts__itemmeta svg, .ah-artifacts__provenance svg { width: 13px; height: 13px; }
|
|
42
|
+
.ah-artifacts__history { margin: 0; background: transparent; border: 0; padding: 0; color: var(--vf-text-secondary); font-size: 11px !important; }
|
|
43
|
+
.ah-artifacts__detail { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
|
|
44
|
+
.ah-artifacts__detailhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 10px; }
|
|
45
|
+
.ah-artifacts__detailhead > div { min-width: 0; }
|
|
46
|
+
.ah-artifacts__detailhead h3 { margin: 0 0 5px; font-size: 17px; font-weight: 600; }
|
|
47
|
+
.ah-artifacts__detailhead button { white-space: nowrap; font-size: 12px; }
|
|
48
|
+
.ah-artifacts__provenance { display: flex; flex-wrap: wrap; gap: 5px 16px; padding: 0 20px 12px; color: var(--vf-text-tertiary); font-size: 11px; }
|
|
49
|
+
.ah-artifacts__provenance span { display: flex; align-items: center; gap: 4px; overflow-wrap: anywhere; max-width: 100%; }
|
|
50
|
+
.ah-artifacts__toolbar { display: flex; justify-content: space-between; padding: 8px 16px; border-block: 1px solid var(--vf-hairline); font-size: 12px; }
|
|
51
|
+
.ah-artifacts__toolbar > div { display: flex; gap: 4px; }
|
|
52
|
+
.ah-artifacts__toolbar button { background: transparent; border-color: transparent; }
|
|
53
|
+
.ah-artifacts__toolbar button[aria-pressed=true] { background: var(--vf-fill-hover); border-color: var(--vf-hairline); }
|
|
54
|
+
.ah-artifacts__toolbar a, .ah-artifacts__published { color: var(--vf-text-primary); text-decoration: none; padding: 7px 10px; border: 1px solid var(--vf-hairline); border-radius: 7px; background: var(--vf-fill); }
|
|
55
|
+
.ah-artifacts__toolbar { gap: 8px; flex-wrap: wrap; align-items: center; }
|
|
56
|
+
.ah-artifacts__toolbar > div[hidden] { display: none; }
|
|
57
|
+
.ah-artifacts__preview { border: 0; background: white; flex: 1; min-height: 150px; width: 100%; }
|
|
58
|
+
.ah-artifacts__source { flex: 1; margin: 0; padding: 20px; overflow: auto; font-size: 12px; line-height: 1.6; tab-size: 2; background: var(--vf-fill); white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
59
|
+
.ah-artifacts__empty { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; padding: 32px 24px; text-align: center; color: var(--vf-text-secondary); font-size: 13px; flex: 1; }
|
|
60
|
+
.ah-artifacts__empty > svg { width: 34px; height: 34px; color: var(--vf-text-tertiary); }
|
|
61
|
+
.ah-artifacts__empty h3 { font-weight: 500; font-size: 15px; margin: 5px 0; }
|
|
62
|
+
.ah-artifacts__empty p { max-width: 330px; line-height: 1.6; margin: 0; }
|
|
63
|
+
.ah-artifacts__message { margin: 0; padding: 12px 20px; font-size: 12px; color: var(--vf-text-secondary); }
|
|
64
|
+
.ah-artifacts__note { margin: 0; padding: 9px 16px; font-size: 10px; color: var(--vf-text-tertiary); border-top: 1px solid var(--vf-hairline); }
|
|
65
|
+
@media (max-width: 800px) { .ah-artifacts { inset: 10px; } .ah-artifacts__filters { flex-wrap: wrap; } .ah-artifacts__filters select { max-width: 140px; } .ah-artifacts__list { padding: 14px; gap: 14px; } }
|
|
66
|
+
@media (max-width: 580px) { .ah-artifacts__detailhead { padding-inline: 12px; flex-wrap: wrap; } .ah-artifacts__head { padding: 12px; } }
|
package/dist/styles/ingest.css
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/* Progress describes its named step and never covers available content. */
|
|
2
2
|
.ah-ingest-status {
|
|
3
|
-
flex: 0 0 auto; margin: 10px 10px 2px; padding: 13px 14px 8px; min-width: 0;
|
|
3
|
+
position: relative; flex: 0 0 auto; margin: 10px 10px 2px; padding: 13px 14px 8px; min-width: 0;
|
|
4
4
|
border: 1px solid var(--vf-hairline-strong); border-radius: 11px;
|
|
5
5
|
background: var(--vf-chrome-surface); color: var(--vf-text-primary);
|
|
6
6
|
font-size: 11px; text-align: left; font-variant-numeric: tabular-nums;
|
|
7
7
|
}
|
|
8
8
|
.ah-ingest-status__eyebrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--vf-text-secondary); font-size: 9px; font-weight: 600; letter-spacing: .045em; }
|
|
9
9
|
.ah-ingest-status h3 { margin: 7px 0 5px; font-size: 13px; line-height: 1.4; font-weight: 600; letter-spacing: -.015em; }
|
|
10
|
-
.ah-ingest-
|
|
10
|
+
.ah-ingest-status__count { color: var(--vf-text-secondary); font-weight: 500; }
|
|
11
|
+
.ah-ingest-status__horizon { margin: 7px 0 0; color: var(--vf-text-secondary); font-size: 10px; line-height: 1.5; }
|
|
12
|
+
.ah-ingest-status .ah-ingest-status__detail { margin: 0 0 13px; color: var(--vf-text-secondary); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
|
|
11
13
|
.ah-ingest-status__amount { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 7px; line-height: 1.4; }
|
|
12
14
|
.ah-ingest-status__amount b { font-size: 11px; font-weight: 500; }
|
|
13
15
|
.ah-ingest-meter { overflow: hidden; height: 4px; border-radius: 4px; background: var(--vf-hairline-strong); }
|
|
@@ -41,10 +43,15 @@
|
|
|
41
43
|
.ah-project-list-item[data-cooking] .ah-project-list-item__metrics { animation: none; }
|
|
42
44
|
.ah-project-list-item__metrics[data-cooking]::after { display: none; }
|
|
43
45
|
.ah-project-list-item[data-cooking]:not([data-fill]) .ah-project-list-item__accent { animation: none; opacity: .3; }
|
|
46
|
+
/* The room's colourless meter (room.css) when nobody knows the amount: it
|
|
47
|
+
sweeps rather than resting at an invented width — a fixed sliver reads as
|
|
48
|
+
progress that was never measured. Same travel as the import card's. */
|
|
49
|
+
.ah-meter[data-indeterminate] i { width: 34%; animation: ah-ingest-travel 1.8s ease-in-out infinite; }
|
|
44
50
|
@keyframes ah-ingest-travel { 0% { transform: translateX(-110%); } 100% { transform: translateX(310%); } }
|
|
45
51
|
@media (prefers-reduced-motion: reduce) {
|
|
46
52
|
.ah-ingest-meter i, .ah-ingest-status__agents summary > span { animation: none; transition: none; }
|
|
47
|
-
.ah-ingest-meter[data-indeterminate] i
|
|
53
|
+
.ah-ingest-meter[data-indeterminate] i,
|
|
54
|
+
.ah-meter[data-indeterminate] i { width: 100%; opacity: .35; animation: none; }
|
|
48
55
|
.ah-project-list-item__accent { animation: none !important; transition: none !important; }
|
|
49
56
|
}
|
|
50
57
|
|
|
@@ -55,3 +62,19 @@
|
|
|
55
62
|
.ah-ingest-controls button:disabled { opacity: .55; cursor: default; }
|
|
56
63
|
.ah-ingest-controls button:focus-visible { outline: 2px solid var(--vf-select); outline-offset: 2px; }
|
|
57
64
|
.ah-ingest-controls [role="alert"] { color: var(--vf-text-secondary); line-height: 1.5; }
|
|
65
|
+
|
|
66
|
+
/* The card's place in the projects column (IngestStatusFold): its height
|
|
67
|
+
follows the card, easing only at the end, so the rows glide. */
|
|
68
|
+
.ah-ingest-fold { flex: 0 0 auto; overflow: hidden; }
|
|
69
|
+
.ah-ingest-fold__content { display: flow-root; }
|
|
70
|
+
.ah-ingest-fold[data-ending] { transition: height 360ms cubic-bezier(.4, 0, .2, 1); }
|
|
71
|
+
.ah-ingest-status[data-compact] { padding: 8px 14px; }
|
|
72
|
+
.ah-ingest-status[data-compact] h3 { margin: 0; font-size: 12px; font-weight: 500; }
|
|
73
|
+
@media (prefers-reduced-motion: reduce) {
|
|
74
|
+
.ah-ingest-fold[data-ending] { transition: none; }
|
|
75
|
+
}
|
|
76
|
+
/* A short window shares column ① between the portfolio and a search card:
|
|
77
|
+
the card keeps its title, amount and meter. */
|
|
78
|
+
@media (max-height: 820px) {
|
|
79
|
+
.ah-ingest-status[data-state^="search_"]:not([data-state="search_failed"]) .ah-ingest-status__detail { display: none; }
|
|
80
|
+
}
|
package/dist/styles/room.css
CHANGED
|
@@ -382,6 +382,15 @@
|
|
|
382
382
|
color: var(--vf-text-faint); font-size: 9.5px; font-weight: 500;
|
|
383
383
|
text-transform: uppercase; letter-spacing: 0.08em;
|
|
384
384
|
}
|
|
385
|
+
/* The import's date-free groups: a head that is a count, not a calendar day.
|
|
386
|
+
It keeps the day head's place and voice, so only the dashed rule above it
|
|
387
|
+
tells it apart from a date. */
|
|
388
|
+
.ah-day[data-not-imported] {
|
|
389
|
+
margin-top: 10px;
|
|
390
|
+
background: linear-gradient(90deg, var(--vf-hairline) 50%, transparent 0) top left / 6px 1px repeat-x,
|
|
391
|
+
linear-gradient(var(--ah-plate) 72%, transparent);
|
|
392
|
+
}
|
|
393
|
+
.ah-session-list > .ah-day[data-not-imported]:first-child { margin-top: 0; }
|
|
385
394
|
/* The session row answers the same four questions the ledger row does, in the
|
|
386
395
|
same corners: state and title on the first line, the agent top-right, the
|
|
387
396
|
facts in the middle, the branch bottom-left and the time bottom-right. */
|
|
@@ -410,6 +419,12 @@
|
|
|
410
419
|
.ah-session-list-item__status[data-tone="red"] { background: var(--vf-red); }
|
|
411
420
|
/* live is the one state that is still happening, so it also breathes */
|
|
412
421
|
.ah-session-list-item__status[data-live] { box-shadow: 0 0 0 3px color-mix(in srgb, var(--vf-green) 22%, transparent); }
|
|
422
|
+
/* Not imported yet is no §2.5 state: a hollow, colourless ring, and its time
|
|
423
|
+
slot speaks in the same faint voice instead of claiming a time. */
|
|
424
|
+
.ah-session-list-item[data-standing="not-imported"] .ah-session-list-item__status {
|
|
425
|
+
background: transparent; box-shadow: inset 0 0 0 1.5px var(--vf-text-faint);
|
|
426
|
+
}
|
|
427
|
+
.ah-session-list-item[data-standing="not-imported"] .ah-last { color: var(--vf-text-faint); font-style: italic; }
|
|
413
428
|
|
|
414
429
|
.ah-session-list-item__header { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; min-height: 16px; }
|
|
415
430
|
.ah-session-list-item__footer { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; min-width: 0; }
|