@aiquants/enrichment-react 0.6.0 → 0.6.1
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 +21 -2
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +30 -5
- package/dist/index.d.ts +30 -5
- package/dist/index.js +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ pnpm add @aiquants/enrichment-react @aiquants/enrichment-core @aiquants/console-
|
|
|
19
19
|
|
|
20
20
|
- **Host owns routes and lists.** No component names an application route or ships a domain list; the host passes `onSearch`, `onCompare`, `domainOptions`, and the like.
|
|
21
21
|
- **DOM hooks are `data-*` / `role` / element only.** Class names are styling and change freely.
|
|
22
|
-
- **Rendered inside the console root.** `InfrastructureHealthMonitor`, `PipelineFlowViewer`, `DocumentHistoryInspector`, `DocumentChangeFeed`, `QdrantStorageCard`, `SyncStatusMonitor`, `DocumentIngestConsole`, the search tab's `DegradedSearchBanner`, `MetadataSearchWorkbench` and `ModelComparisonWorkbench`, and the instant slots `RecordedInstant` and `FinishedInstant` read `@aiquants/console-ui`'s `ConsoleUiRoot` and throw outside it. The other components do not read the root and render anywhere.
|
|
22
|
+
- **Rendered inside the console root.** `InfrastructureHealthMonitor`, `PipelineFlowViewer`, `DocumentHistoryInspector`, `DocumentChangeFeed`, `ProcessingObjectBrowser`, `QdrantStorageCard`, `SyncStatusMonitor`, `DocumentIngestConsole`, the search tab's `DegradedSearchBanner`, `MetadataSearchWorkbench` and `ModelComparisonWorkbench`, and the instant slots `RecordedInstant` and `FinishedInstant` read `@aiquants/console-ui`'s `ConsoleUiRoot` and throw outside it. The other components do not read the root and render anywhere.
|
|
23
23
|
Every component that reads the root checks it before drawing anything (the root requirement below), so none of them reads the root, draws the root's label or writes in the root's zone under a root it was not written for.
|
|
24
24
|
This package ships no stylesheet (the host's Tailwind build compiles its classes), and the host loads `@aiquants/console-ui/styles/console-ui.css` once, with its `cui` cascade layer ranked above the host's reset, as `@aiquants/console-ui`'s README describes under "Loading the stylesheet" (for a Tailwind v4 host, `@import` it in the CSS entry after the layer statement `@layer theme, base, components, utilities;`).
|
|
25
25
|
Without it the root's `--cui-*` token variables are unset, a `Measured` count loses its tabular figures, `QdrantStorageCard`'s name buttons (`@aiquants/console-ui`'s `RowButton`) are drawn as the browser's plain buttons without the selected look, `InfrastructureHealthMonitor`'s probe-state marks and `QdrantStorageCard`'s health badge lose their role colours (`success-fg` / `danger-fg` and their tints), and the root's live region (`role="status"`) is drawn in the flow of the page instead of being visually hidden.
|
|
@@ -100,6 +100,8 @@ The row `promotingId` names reads `源を写しで上書き中...` (`aria-busy`)
|
|
|
100
100
|
and focus moves to the row's unlock record only when it fell to the document body, never from another control; the promote, retry and history buttons are 44 px tall.
|
|
101
101
|
A run that failed at `unlock_document` adds the hint that a file password matching the file must be added before a retry, and that a protection no component removes must be removed where the file was made (`ingest-unlock-hint-${id}`).
|
|
102
102
|
`listRefusal?: string` is the full sentence that refuses the operator the list (no `file:read`, or a column-scoped one; V6 / V9): when set, the list is replaced by that sentence in a warning `Notice` (`recent-items-refused`), with no row, no empty sentence (`取り込み履歴はありません。` would claim that nothing was ingested) and no row action.
|
|
103
|
+
`onShowAllObjects?: () => void` draws `全ての処理オブジェクトを見る` (`recent-items-all-objects`, `@aiquants/console-ui`'s `Link`, an in-document move) beside the list's heading and calls it when pressed; it is not drawn while the list is refused (the full list refuses the same operator). The table here is a window of the recent rows; the full list is `ProcessingObjectBrowser`.
|
|
104
|
+
The status badges read their words from `SYNC_STATUS_LABELS` (`syncStatusPresentation.ts`), the table `ProcessingObjectBrowser` reads too.
|
|
103
105
|
The inspection result writes the file's size under `inspection-file-size-value` (`MeasuredFigure`: tabular figures, `data-measured="true"`, never broken between the number and its unit, the same slot as `QdrantStorageCard`'s byte sizes) with the package's one byte format:
|
|
104
106
|
binary units (B below 1 KiB, then KiB / MiB / GiB / TiB) chosen after rounding (1,048,575 bytes is `1.0 MiB`), the mantissa grouped in the root's format locale (`3,072.00 TiB`). `fileSize` must be a non-negative safe integer; otherwise the console throws `RangeError` naming `fileSize`, with `@aiquants/console-ui`'s `formatCount` refusal as its `cause`, instead of writing a negative size as `0 B` or a fraction without a unit.
|
|
105
107
|
That refusal is a backstop: thrown while the console renders, it would take the operator's unsent form input with the console. The host refuses a broken size where it reads the inspect response (its schema fails the inspect request, shown as a failed inspection), so a value that reaches the console is valid.
|
|
@@ -272,6 +274,7 @@ Without `selection` the names are text and every row is `data-selected="false"`.
|
|
|
272
274
|
|
|
273
275
|
`sync_status` breakdown with individual and bulk retry controls. Required props: `counts`, `totalFiles`; `failedItems` is `readonly FailedSyncEntry[]`, readable rows `{ kind: "readable", item: FailedSyncItem }` and restricted marks (`RestrictedFailureMark`, V11) drawn as one row with `隔離 (RESTRICTED) の文書`, the sync status and the failure time only, without a retry (`failed-item-restricted-${position}`);
|
|
274
276
|
`listRefusal?: string` replaces the list with the refusal sentence in a warning `Notice` (`failed-items-refused`), with no row, no empty sentence, no row retry and no count in the list's heading, while the status tiles stay; each failed item's `failed_at` (an ISO 8601 instant with an explicit offset) is written in the root's zone under `failed-item-time-value-${id}` inside `failed-item-time-${id}`, the same clock as every other panel, and `null` reads `記録なし`. The monitor reads the root's zone, so it renders inside `ConsoleUiRoot`.
|
|
277
|
+
`onShowAllFailures?: () => void` draws `全ての失敗を見る` (`failed-items-all-failures`, a `Link`) below the list's heading and calls it when pressed, unless the list is refused; the list here holds its first rows only.
|
|
275
278
|
|
|
276
279
|
### 12. `DocumentChangeFeed`
|
|
277
280
|
|
|
@@ -281,6 +284,21 @@ The recent document changes (S1 §3.3.5-4), a full-width `Card` `直近の文書
|
|
|
281
284
|
- A restricted mark (V11) is one row of the same table with its time and `隔離 (RESTRICTED) の文書` only; its React key is its position (`changeFeedRowKey`).
|
|
282
285
|
- A failed re-read or later page keeps the rows shown and says why (a failed re-read in `change-feed-refresh-failed`, announced again when the same failure repeats); a later page's 403 re-reads the first page, and a 403 there withdraws the list (`文書の履歴を閲覧する権限がありません。<原因>。`).
|
|
283
286
|
|
|
287
|
+
### 13. `ProcessingObjectBrowser`
|
|
288
|
+
|
|
289
|
+
The processing-objects list, a full-width `Card` `処理オブジェクト一覧` that reaches every `td_file_metadata` row of the tenant the operator may read (the ingested documents and the nodes of their trees), newest first, read a keyset page at a time (`PROCESSING_OBJECT_PAGE_SIZE` rows, `LoadMore`) through `@aiquants/enrichment-core`'s processing-objects contract.
|
|
290
|
+
Props: `host: ProcessingObjectHost` (`{ loadPage(filter, cursor, signal) }`, `processingObjectHost.ts`), the controlled `filter: ProcessingObjectFilter` with `onFilterChange(filter)`, and the optional `onOpenHistory(metadataId)` (without it there is no `履歴` column).
|
|
291
|
+
|
|
292
|
+
- The filters: three `SegmentedControl`s (`processing-objects-kind` / `-revision` / `-deleted`), a `Select` of the sync status (`processing-objects-status`; a node is filtered by its root's status) and a name query form (`processing-objects-query`, `絞り込む`).
|
|
293
|
+
Each control asks the host for the whole filter with the one key changed (pressing the pressed segment asks nothing); the query is sent trimmed when the form is submitted, a blank query drops the query, and a query over `PROCESSING_OBJECT_QUERY_MAX_CHARS` characters is not sent and shows the field's error. The labels are `PROCESSING_OBJECT_KIND_LABELS`, `PROCESSING_OBJECT_REVISION_LABELS`, `PROCESSING_OBJECT_DELETION_LABELS` and `PROCESSING_OBJECT_STATUS_LABELS`.
|
|
294
|
+
- A changed filter reads the list again from its first page (the paged key is the filter). The first page must carry the total (`ProcessingObjectPage.total`); a first page without one breaks the host's contract and throws to the nearest error boundary.
|
|
295
|
+
- The count `全 N 件のうち M 件を表示しています。` (`processing-objects-count`) is written above the table and announced (`useAnnounce`) whenever it changes.
|
|
296
|
+
- A row (`processing-object-row`, `data-row-kind` `document` / `node` / `restricted`) shows the id, the kind (`文書 (<document kind>)` or the asset type's name), a node's place (`treePathLabel` and `根 <id>`), the name (a document's name and URI, a node's `source_name` or `名前なし`), the classification and revision (`CONFIDENTIALITY_LEVEL_LABELS`, `r<n>`, `旧版`, `削除済み`), the status and the times (`登録` / `更新`, `RecordedInstant`).
|
|
297
|
+
A document's status is its sync status badge (`SYNC_STATUS_LABELS`, `syncStatusTone`) or `取り込みの記録なし`, and the error of a failure; a node's is `根の実行` with its root's sync status and `読み: <step> <status> (<skip reason>)` (`nodeReadingText`, `読みの記録なし` when the root's latest run did not read it).
|
|
298
|
+
`履歴` opens the document's history (`文書の履歴`), and a node's opens its root's (`根の履歴`); the button names its object to assistive technology.
|
|
299
|
+
- A restricted mark is one row with `隔離 (RESTRICTED) の文書`, its sync status and its times only, keyed by its position. A list narrowed by name holds no mark (the host's contract).
|
|
300
|
+
- A failed re-read or later page keeps the rows shown and says why (`processing-objects-refresh-failed`); a later page's 403 re-reads the first page, and a 403 there withdraws the list (`処理オブジェクトを閲覧する権限がありません。`).
|
|
301
|
+
|
|
284
302
|
## Search Exchange Shapes (`documentSearch.ts`)
|
|
285
303
|
|
|
286
304
|
The shapes the two workbenches exchange with their host, field for field the public API's answers, and the words they are drawn with:
|
|
@@ -294,7 +312,7 @@ The words: `SEARCH_MODE_LABELS`, `SEARCH_FUSION_LABELS`, `QUALITY_TIER_LABELS`,
|
|
|
294
312
|
`tests/colorContrast.spec.tsx` checks the parts of the console drawn through `@aiquants/console-ui`'s colour roles against WCAG 2 AAA in both colour schemes: text needs 7:1 (1.4.6) and graphics 3:1 (1.4.11), both read from `@aiquants/console-ui`'s `CONTRAST_MINIMUM`, and the ratio is its `contrastRatio`, the repository's only contrast computation.
|
|
295
313
|
The package keeps no luminance computation or contrast bar of its own, the colour spec included.
|
|
296
314
|
|
|
297
|
-
- **History screens:** `DocumentHistoryInspector` and `
|
|
315
|
+
- **History screens and the processing-objects list:** `DocumentHistoryInspector`, `DocumentChangeFeed` and `ProcessingObjectBrowser` paint their colours only through `@aiquants/console-ui`'s roles; their specs run `scanColourRoles` over the rendered panel, so every text sits on a pair `CONTRAST_PAIRS` lists for both schemes (the diff pieces are `fg` on `danger-tint` / `success-tint`).
|
|
298
316
|
- **Search tab:** `DegradedSearchBanner`, `MetadataSearchWorkbench` and `ModelComparisonWorkbench` paint nothing themselves (no class, no style); their specs run `scanColourRoles` over the console root with an answer drawn (the degraded note, the run, the hit list and the detail; the comparison's agreement, a variant's warning and the grid), so every text sits on a pair `CONTRAST_PAIRS` lists for both schemes.
|
|
299
317
|
- **Probe-state marks:** the health monitor's overall badge, each probe's badge, and each probe's error text (`service-error-${service}`), with every probe connected and with some probes failed (a connected one among them carrying an error text), each at rest and while re-probing, with and without the refresh button; the Qdrant card's health badge (`qdrant-health-badge`), connected and failed, at rest and while refreshing.
|
|
300
318
|
Each mark's texts pass `@aiquants/console-ui/testing`'s role scan `scanColourRoles` as exactly its own pair, its state's `success-fg` on `success-tint` or `danger-fg` on `danger-tint`, and the error text's `danger-fg` on `danger-tint` in either state (pairs `@aiquants/console-ui`'s `CONTRAST_PAIRS` lists for both schemes, so each meets the text bar).
|
|
@@ -315,6 +333,7 @@ Exported for hosts that draw their own run tables, so a run reads the same every
|
|
|
315
333
|
`documentKindLabel(kind)` names a run's document kind the same way (`DOCUMENT_KIND_LABELS`, or `知らない種類 (<kind>)`). `PipelineRunSteps` draws a step with an unknown key as one card, never inside a fan-out group. The flow diagram and the step metrics never show the terminal step (`PIPELINE_FLOWS` does not name it); only `PipelineRunSteps` does. `RUN_TERMINAL_STEP_OUTCOME_LABELS` words a succeeded terminal step's outcome.
|
|
316
334
|
- `documentHistoryPresentation` — the history's words for hosts: `FACET_LABELS`, `DOCUMENT_STATE_CAUSE_LABELS`, `facetCountsText(counts)`, `revisionLabel`, and the restricted marks' fixed texts `RESTRICTED_DOCUMENT_TEXT` (`隔離 (RESTRICTED) の文書`), `RESTRICTED_STATE_TEXT` and `RESTRICTED_RUN_TEXT` (`隔離されていた期間の実行`), so a host table that draws a mark row writes the same text.
|
|
317
335
|
|
|
336
|
+
- `syncStatusPresentation` — the words of every sync status (`SYNC_STATUS_LABELS`: `待機中`・`本文抽出中`・`AI 要約・構造化中`・`ベクトル/グラフ投影中`・`同期完了`, and a failure as `失敗: <status>`), the tone of its badge (`syncStatusTone`: a failure `danger`, `SYNCED` `success`, the rest `info`) and `NO_ENRICHMENT_RECORD_TEXT` (`取り込みの記録なし`), read by the recent-ingest table and the processing-objects list alike.
|
|
318
337
|
- `PIPELINE_RUN_STATUS_PRESENTATION` — `{ label, className }` for `RUNNING` / `SUCCEEDED` / `FAILED` and `FAILED_RETRY_SCHEDULED` (`失敗 (再試行予定)`); pick the key with `pipelineRunPresentationKey({ status, retryScheduled })` (a retry marker on a non-failed run is ignored).
|
|
319
338
|
- `PIPELINE_STEP_STATUS_PRESENTATION` — `{ label, className, bar }` per step status.
|
|
320
339
|
- `PIPELINE_TRIGGER_LABELS` — operator-facing names of the triggers `PipelineTriggerSchema` allows: `ingest` (取り込み), `retry` (再試行), `resync` (再同期).
|