feat: extract review-workspace slice into @citation-evidence/work (CWORK-WP-0001)
Establishes citation-work as the standalone home of the review workspace, migrated out of the citation-evidence umbrella app. - Package/tooling scaffold: package.json, tsconfig, vite/vitest/eslint configs with eslint-plugin-boundaries enforcing engine/anchor/source-only imports - Providers/hooks: EngineProvider, SessionProvider + use* hooks (T02) - Panes: CollectionList, ViewerShell, EvidenceSidebar (T03/T04/T05) - Capture/edit: InlineCaptureForm, EvidenceFormBody; UploadDropzone owned here - ReviewShell: repo-owned three-pane layout with an upload slot seam - Tests: CollectionList, InlineCaptureForm capture flow, EvidenceSidebar export/edit/activation (11 tests, all green) - Anchor consumed as @citation-evidence/evidence-anchor package; @source kept on the umbrella facade for its local viewer-url policy - Docs (README/SCOPE) refreshed; deferred gaps recorded Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
c51ef94812
commit
0cd2ca5d04
30 changed files with 7958 additions and 342 deletions
82
README.md
82
README.md
|
|
@ -2,16 +2,78 @@
|
|||
|
||||
A document review workspace — the React surfaces for the review workflow:
|
||||
collection list, viewer shell, evidence sidebar, annotation create flow,
|
||||
form-binding side-by-side layout.
|
||||
and review-oriented upload/navigation shell.
|
||||
|
||||
## MVP status: INTENT only
|
||||
Published as the `@citation-evidence/work` package and consumed by the
|
||||
`citation-evidence` umbrella app's review mode.
|
||||
|
||||
During the citation-evidence MVP, code lives upstream in
|
||||
[`citation-evidence`](../citation-evidence/) under `src/work/`. This repo
|
||||
currently holds `INTENT.md` describing what will move here. Contract
|
||||
changes belong in
|
||||
[`citation-evidence/wiki/SharedContracts.md`](../citation-evidence/wiki/SharedContracts.md),
|
||||
not here.
|
||||
## Current state
|
||||
|
||||
Per the dependency map, work depends on `shared/`, `engine/`, `anchor/`,
|
||||
and `source/` — and **may not** import from `binder/`.
|
||||
This repo is now the **code of record** for the review workspace. The slice was
|
||||
extracted from the umbrella app under `CWORK-WP-0001`; `citation-evidence` no
|
||||
longer carries a local `src/work/` implementation and instead depends on this
|
||||
package (its `@work` alias resolves here).
|
||||
|
||||
Package surface (`src/work/index.ts`):
|
||||
|
||||
- **Shell:** `ReviewShell` — the three-pane review layout (collection · viewer · sidebar)
|
||||
- **Panes:** `CollectionList`, `ViewerShell`, `EvidenceSidebar`
|
||||
- **Capture/edit:** `InlineCaptureForm`, `EvidenceFormBody`
|
||||
- **Upload:** `UploadDropzone` (also the default `ReviewShell` upload slot)
|
||||
- **Providers/hooks:** `EngineProvider`, `SessionProvider`, and the associated
|
||||
`use*` hooks; `useExportEvidence`; `useDebugFlag`
|
||||
|
||||
### Upload seam decision (T03)
|
||||
|
||||
`UploadDropzone` is owned by this package — it depends only on `@source` and the
|
||||
local engine/session hooks, so the shell renders a complete review surface with
|
||||
no umbrella-local imports. `ReviewShell` still exposes an `upload` slot so a
|
||||
consumer can substitute its own affordance; when omitted, the package default is
|
||||
used.
|
||||
|
||||
## Boundary
|
||||
|
||||
`citation-work` depends on:
|
||||
|
||||
- [`@citation-evidence/engine`](../citation-engine/)
|
||||
- [`@citation-evidence/evidence-anchor`](../evidence-anchor/)
|
||||
- `@source` (PDF ingestion + viewer-url policy)
|
||||
|
||||
It may **not** import from binder-owned or umbrella-app-owned review-to-form
|
||||
code. The dependency edges are enforced by `eslint-plugin-boundaries` in
|
||||
`eslint.config.js`.
|
||||
|
||||
## Alias / extraction notes
|
||||
|
||||
`citation-engine` and `evidence-anchor` are extracted sibling packages and are
|
||||
consumed by their package names. `@source/*` still resolves into the umbrella's
|
||||
`src/source` façade because that façade owns the local `viewer-url` policy that
|
||||
is not part of the extracted `evidence-source` package. This is the one
|
||||
remaining transitional edge; see the deferred list below.
|
||||
|
||||
## Deferred after this extraction
|
||||
|
||||
The following were intentionally **not** part of `CWORK-WP-0001` and remain for a
|
||||
subsequent workplan slice (see the workplan's "Deferred After This Workplan"
|
||||
section for the authoritative list):
|
||||
|
||||
- collection search / filter UX,
|
||||
- document review-status interactions,
|
||||
- evidence-item status / tagging / filtering UX,
|
||||
- binder-integrated review-to-form workflows,
|
||||
- new viewer/document-format features beyond the current PDF slice,
|
||||
- retiring the `@source` façade edge once a `viewer-url` home is decided (either
|
||||
a small local module here or an `evidence-source` addition).
|
||||
|
||||
## Verification
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm typecheck
|
||||
pnpm lint
|
||||
pnpm test
|
||||
```
|
||||
|
||||
## Workplan
|
||||
|
||||
- [CWORK-WP-0001](workplans/CWORK-WP-0001-extract-review-workspace.md)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue