feat: insert evidence directives from the TechLog asset picker
Adds an Asset Picker and upload dialog to the CASE editor so authors can insert `:::evidence` directives that reference backend assets, and opens projectWorkingCopy's two evidence gates so Instant Preview accepts a key backed by a freshly loaded READY asset instead of only the one hardcoded legacy key. The editor screen now owns the loaded Asset list so the Picker, the upload dialog, and Instant Preview all read the same array, and a freshly uploaded asset appears in the preview without a refetch. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
e2c1d076f4
commit
54d9bf9120
@@ -79,9 +79,14 @@ function Announcement() {
|
||||
}
|
||||
|
||||
function renderEditor(documentId: string, gateway: StudioGateway) {
|
||||
// CASE editors mount the Asset Picker (Task 10), which uses the throwing
|
||||
// `useStudioAssetGateway()` accessor -- a test harness that renders it must
|
||||
// supply `createAssetGateway`, the same as `StudioShell` always does.
|
||||
const assetGateway = createTechLogFeatureInstalledInput(MOCK_STUDIO_INSTALL_CONTEXT)
|
||||
.input.createStudioAssetGateway();
|
||||
return render(
|
||||
<MemoryRouter initialEntries={[`/studio/documents/${documentId}/edit`]}>
|
||||
<StudioProvider createGateway={() => gateway}>
|
||||
<StudioProvider createGateway={() => gateway} createAssetGateway={() => assetGateway}>
|
||||
<DocumentEditorScreen documentId={documentId} />
|
||||
<Announcement />
|
||||
</StudioProvider>
|
||||
|
||||
Reference in New Issue
Block a user