feat(content-drive): add workflow filter (scheme → step) to toolbar #35880#35906
feat(content-drive): add workflow filter (scheme → step) to toolbar #35880#35906zJaaal wants to merge 28 commits into
Conversation
…35880 Add a two-column popover filter mirroring the content-type filter: workflow schemes on the left, steps of the focused scheme on the right. Single-select on both columns, stored as a one-element array so a future multi-select migration is trivial. - DotWorkflowService: getSchemesByContentTypes() and getSteps() - Scheme source follows the content-type selection (all schemes / schemes for selected content types); steps loaded on demand and cached per scheme - Selection persists via the store filters (workflowScheme/workflowStep), round-trips in the URL, drives the chip and Clear-all - Reconciles the selected scheme on content-type change (kept if still present, else cleared) First draft. Backend drive-search support is tracked in #35470 — until it lands the filter is UI-complete but does not yet narrow listing results. Tests deferred pending manual verification. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…er scheme #35880 Reshape the workflow filter selection model and lock it down with tests: - Schemes are multi-select; each selected scheme can pin one step (single per scheme). Pinning a step cascades to select its scheme; deselecting a scheme drops its pinned step. - Persist the selection as one structured filter key `workflow: string[]`, where each entry is `schemeId` or `schemeId:stepId`. Co-locating the step with its scheme keeps the pairing explicit, so reconcile and URL round-trip need no step lookups. Registered with the existing multiSelector decoder. - Empty-schemes state now shows a dedicated, i18n'd message (singular/plural by selected content-type count) instead of reusing the step column's copy. - Center the empty/loading states; render them as flex siblings of the listbox. - Tests: component spec (loading, chip, selection, per-scheme step, empty copy, listbox config) and a workflow encode/decode round-trip in functions.spec. Backend search support remains tracked in #35470. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Configure VS Code MCP servers for the workspace so the editor's AI tooling can reach the PrimeNG, Nx, and Angular CLI MCP servers via npx. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Claude finished @zJaaal's task in 6m 53s —— View job PR Review
Issues FoundBackend
Frontend
Chore
SummaryThe core logic is sound: SQL is parameterized, sanitization via |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Avoid a duplicate getSteps request in #reconcileSelection by excluding the newly-focused scheme (#focusScheme already loads it) from #ensureStepsLoaded. - Add a distinct empty-state message for the no-content-type-selected case (`no-schemes`); gate the singular/plural "no workflows" copy behind count > 0. - Guard #loadSchemes against stale responses with a request-id token so a late reply from a superseded content-type change can't overwrite a newer one. - Defensively short-circuit getSchemesByContentTypes on an empty id list. - Tests: no-content-type empty copy, step deselect (ngModelChange null), and the stale getSteps late-response guard; re-establish mock defaults per test to prevent of([]) return-value leakage across cases. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…arch #35470 Implements the backend (#35470) for the Content Drive workflow filter (#35880), filtering in the SQL layer — no forced Elasticsearch path. - BrowserQuery: workflowSchemeIds (scheme-only) + workflowStepIds (pinned steps) with withWorkflowSchemeIds/withWorkflowStepIds builders. - BrowserAPIImpl.selectQuery: appendWorkflowQuery emits an OR'd EXISTS block — scheme-only entries match by content-type assignment (workflow_scheme_x_structure) so imported / push-published content with no workflow_task still appears; step-pinned entries match the current task (workflow_task.status). All ids bound as parameters. Shared selectQuery means both drive/search and /v1/browser are covered. - DriveRequestForm: structured `workflow: [{ scheme, step? }]` field via a nested immutable WorkflowFilterForm; ContentDriveHelper splits entries into the two sets and suppresses folders when a workflow filter is active. - FE: DotContentDriveSearchRequest.workflow field; store $request derives it from the structured `workflow` filter tokens (parseWorkflowFilter) and drops folders when present. openapi.yaml unchanged — the drive search endpoint is @hidden. Integration tests to follow once verified against a running instance. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…lts #35880 When a search lands on cursors matching an already-seen page, loadItems reused the existing pages array verbatim — so an empty result that coincided with DEFAULT_PAGE's 0,0 cursors kept its optimistic hasMoreContent: true, and the paginator's $totalItems reported limit*2, enabling "next" on zero items. Refresh the matched page's hasMore flags from the actual response (new array ref so $totalItems recomputes). Fixes any empty filter, not just workflow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Cover the DB-first workflow filter semantics in ContentDriveHelper#driveSearch: - scheme-only entry matches by content-type assignment (workflow_scheme_x_structure), including task-less / never-actioned content - step-pinned entry matches the current workflow_task only - OR semantics across entries - no-filter regression guard - folder suppression when a workflow filter is active Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
This PR removes |
The removal was intentional |
…rializers #35880 Cover parseWorkflowToken / workflowEntryToToken / parseWorkflowFilter directly (previously only exercised via the URL encode/decode round-trip): empty token, leading separator, step id containing colons (first-colon split), scheme-only vs scheme+step serialize, and a parse<->serialize round-trip. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…35880 Adds the AND-semantics case the PR review flagged: a content-type filter and a workflow scheme filter active together return the intersection (type A at scheme A), and type C is excluded by the content-type clause despite having its own scheme. Promotes typeA/typeC to fields so the new case can reference them. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…uite3a #35880 Address PR review (fabrizzio): integration tests only run in CI when listed in a suite. Add ContentDriveWorkflowFilterTest alongside the sibling ContentDriveHelperContentletAPIComparisonTest in MainSuite3a. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Proposed Changes
Frontend and backend for the Content Drive Workflow filter (scheme → optional step), implemented together in this PR. Closes #35880 (frontend) and #35470 (backend — consolidated here).
Frontend (#35880)
workflow: string[](entries areschemeIdorschemeId:stepId), so it round-trips through the URL via the existingencode/decodemachinery with no step lookups.DotWorkflowServicemethods:getSchemesByContentTypes()andgetSteps().Backend (#35470) — DB-first
POST /api/v1/drive/searchnow honors an optionalworkflow: [{ scheme, step? }]field.BrowserAPIImpl.selectQuery→appendWorkflowQuery), keeping the drive's DB-first hybrid intact — no forced Elasticsearch path.workflow_scheme_x_structure), so imported / push-published / never-actioned content (noworkflow_task) still appears under its scheme.workflow_task.status). Entries combine with OR. Folders are suppressed when a workflow filter is active.WorkflowFilterFormonDriveRequestForm;BrowserQuery.withWorkflowSchemeIds/withWorkflowStepIds. All ids are bound as?parameters (no string concatenation).$requestwires the storedworkflowtokens into the drive-search request.Chore
chore(vscode): add MCP server config (primeng, nx, angular-cli).Checklist
workflowencode/decode round-trip infunctions.spec.ts+ store empty-result pagination testContentDriveWorkflowFilterTestintegration test — scheme filter (incl. task-less content), step filter (current task), OR semantics, no-filter regression, folder suppressioncontent-drive.workflow-filter.*keys added toLanguage.propertiesAdditional Info
The backend ticket #35470 has been consolidated into this PR (and its design folded into #35880); it is closed in favor of #35906. The request contract there matches the structured
workflowfield used here.🤖 Generated with Claude Code