Praxis Table Selection Export Runtime
Use this skill when the issue depends on selected rows, bulk operations, row events, or governed export from @praxisui/table.
Selection and export are runtime evidence. They should be derived from table state, capabilities, and declared export configuration, not from DOM order, viewport text, guessed IDs, or local action labels.
Source Audit
Inspect before editing:
projects/praxis-table/AGENTS.md
projects/praxis-table/src/lib/praxis-table.ts
projects/praxis-table/src/lib/praxis-table.metadata.ts
projects/praxis-table/src/lib/table-global-action-adapter.ts
projects/praxis-table/src/lib/toolbar-actions-editor/**
projects/praxis-table/src/lib/praxis-table-config-editor.*
projects/praxis-table/src/lib/ai/table-context-pack.ts
projects/praxis-table/src/lib/ai/table-agentic-authoring-turn-flow.ts
- focused selection, bulk, export, global action, config editor, and AI context specs.
projects/praxis-table/src/lib/bulk-sync/table-bulk-sync-workflow.component.ts, its template and spec
projects/praxis-table/src/lib/praxis-table.bulk-sync.spec.ts
projects/praxis-table/test-dev/e2e/table-bulk-sync-governed.playwright.spec.ts
Inspect @praxisui/core collection export models/services and global action payload contracts when export or actions cross package boundaries.
Selection Rules
- Use canonical outputs:
rowClick, selectionChange, widgetEvent, resourceEvent, and recordSurfaceOpen as applicable.
- Preserve
selectionChange shape with trigger, selectedRows, selectedCount, optional row, and tableId.
- For Material single selectors, consume the semantic
change output rather than treating a host click as a selection change. The enlarged touch target can stop that click, while a label can forward an additional native click. Keep row-click propagation separate, and test native input, label, touch target, repeated activation and the existing keyboard-clear path. Assert one canonical selection event and matching selected rows; a checked DOM radio alone is not evidence that Table state or its consumers updated.
- Distinguish selection modes and focus targets in browser proof. With single selection and
mode: row, Enter/Space on the row selects it; it does not clear it. mode: both exposes the explicit selector alongside row activation. Space on the focused checked selector uses the existing deselection path. Verify the selector state, canonical selected count, and downstream detail empty state together. Do not promise repeated-click deselection or implement host-local state clearing to compensate for an unexposed selector.
- Use selected row snapshots and sanitized selected-record context for AI; do not expose raw internal fields unless explicitly required.
- Treat
selectedRecordsContext as governed read-only grounding for analysis of the current selection. Questions to understand, summarize, compare, inspect, rank, or explain selected records should answer with info grounded in sanitized sampleRows; do not convert them into componentEditPlan, table.filter.apply, export, row action, navigation, or backend mutation unless the user explicitly asks to apply/configure/create/open/export.
- When a request explicitly asks to turn selected records into filters, use declared
selectedRecordsContext.filterCandidates as the canonical bridge to advanced filters; prefer candidate labels and criteria over re-inferring values from prose, selected ids, sample rows, or visible cell text. If the shared property is ambiguous, ask a concise clarification grounded in filter-field labels or export scopes.
- When selected records also expose
recordSurfaces, requests to open, consult, view, navigate to, or inspect a related surface should ground on the declared surface ids before considering selection-derived filters.
- Bulk actions are disabled when no rows are selected unless a governed action says otherwise.
- Reconcile selection after data refresh by stable row identity, not visual index.
- On remote pagination, clear non-persistent selection through the existing selection event before requesting the new page when both
persistSelection and persistOnDataUpdate are off. Do not retain obsolete detail context until the response in that policy.
- Preserve both opt-in policies during loading:
persistSelection may retain rows across pages; persistOnDataUpdate must reconcile against returned row identities. Cover the event-before-request order and avoid a duplicate clear on completion. Do not generalize pagination timing to every refresh/filter/sort without auditing those lifecycles.
- For related resource or surface actions, separate row-selection transport from authorization. Availability comes from capabilities, surfaces, actions, or
_links.
Selection and filter announcements use semantic record/point identity and
current governed state. Preserve focus across CRUD overlays and data refresh;
do not rebuild selection from rendered row indexes.
BASIC Uniform Bulk Workflow
For the first uniform UI, consume UNIFORM_UPDATE / SYNC / EXPLICIT / PER_ITEM
through the existing Core bulk client/session and published editable-field schema.
Capture selection by exact wire identity, canonical self links and strong resource
ETags, with complete operation/resource and enterprise scope, including organization.
Evaluation prepares a protected preview without domain effects. Confirmation is a
separate explicit action using the original proposal and one stable key per intent;
uncertain responses/replay do not authorize a fresh proposal or automatic mutation.
Keep intent custody separate from the currently authorized screen projection. A
401/403/404/410 from proposal, preview, execution or results must hide retained
intent/form values, diagnostics, totals, rows and cursors and disable confirmation.
Invalidate the projection epoch on denial or context loss; ignore every late response
from an earlier epoch, including 200. Returning to the same scope requires complete
fresh authorized proposal/preview or execution/results reads before any redisplay.
An organization A → unavailable → B transition must not show or confirm A's intent.
For an intent with uncertain confirmation or a pending execution, returning to A
retains original custody/key but requires that fresh reauthorization. An unconfirmed
proposal may be discarded on context change; do not promise universal retention.
Do not treat a refreshed metadata label as a different business intent.
Apply the existing config.behavior.loading.requestTimeoutMs budget to BASIC
consultations, including selected-item versions, preview pages, execution/results
and fresh authorization. Capture the policy when starting each consultation;
default 30000 and explicit zero retain the existing Table semantics. Keep the
internal workflow input connected to the current Table config rather than freezing
it inside retained intent custody. No separate bulk timeout editor or metadata knob
is needed.
Destruction, authorization-epoch invalidation and deadline expiry must abort the
active GET transport, release busy state and reject late projection updates. For
session reads, pass the abort signal through the Core Promise API to its HTTP
subscription. pendingSessionWork is only for dispatched evaluate/confirm POSTs:
remount must not wait forever on an obsolete GET, and a GET timeout must not cancel
or repeat an uncertain confirmation. Prove a never-responding transport, cancellation,
fresh retry, remount and preserved POST/key with controlled unit tests and a focal
browser scenario. Record browser mocks separately from backend effect evidence.
Render all nine global execution totals from the authorized backend snapshot:
targetCount, pending, confirmed, unchanged, denied, invalid, conflict,
notProcessed, and unknown. A partial results page never determines those totals
or proves that unloaded targets succeeded. Keep cursor pages bound to the intent
and context; the legacy details[{id,ok,error}] collection outcome is a separate path.
Prove open-screen revocation for all four statuses, late-200 epoch rejection,
organization transitions, complete reauthorization and mixed global totals with an
incomplete page in the workflow/Table specs. Use the existing governed Playwright
fixture for keyboard/narrow-screen UI proof, and record it as mocked transport;
real protected HTTP and backend effect/replay proof require separate receipts.
Review Core/Table READMEs and the real host composition as derived references.
Review the exact runtime source and focused evidence before adoption; real HTTP
acceptance remains a separate gate from these UI proofs.
Per-Item Collection Outcomes
Inspect table-collection-outcome.component.ts, Table's remote regression specs and
Core's resource-action-open-adapter.service.ts when a bulk command declares
PER_ITEM. HTTP success does not mean all selected records succeeded. Materialize
the existing details[{id,ok,error}] outcome near the table with counts, expandable
item results and non-color failure labels. Preserve only failed identities for a
retry; the prior successful records must not be submitted again. Clear or ignore
stale outcomes when the resource/action context changes.
The Core adapter carries existing selection.idsField and selection.versionsField
into groupedCommand.contextFields and suppresses the generic success toast for
PER_ITEM; Table owns the outcome presentation. Do not reconstruct selection/version
payloads or translate backend reasons by keyword in the host.
Prove mixed success/failure, selection retention, retry scope, keyboard and narrow
layout with exclusive test records. Cleanup belongs in finally with enough timeout
budget, then verify GET 404. Include context/payload tests and prove that a retry does
not change the successful record's version. Public Table/Core READMEs and the bulk
composition recipe are derived references to review with this path.
Export Rules
- Use
PraxisCollectionExportService and core export request/result contracts.
- Honor declared formats and scopes:
selected, filtered, currentPage, all, and auto.
selected scope must come from selected row state or selected ids; filtered scope must come from effective filters/query context; currentPage from the current paged data.
- Do not add direct CSV/PDF/XLS generation in a host or table branch when core collection export already owns the operation.
- Treat host-declared export config as a contract. If host export config changes, reconcile persisted table config accordingly.
Aderence Inventory
Classify before adding selection/export behavior:
ja-suportado-so-ux: event/export state exists but UI, toolbar, empty state, or assistant does not expose it.
ja-suportado-mal-nomeado-ou-mal-materializado: a local selected-id or export shape should map to core collection export or table selection outputs.
suportado-parcialmente: selection/export exists but scope mapping, persistence, AI context, capabilities, docs, or direct consumer proof is incomplete.
lacuna-real-de-contrato: no table/core event, export scope, request, or capability can express the operation.
Only real gaps justify new public contracts. Otherwise fix materialization or consumer wiring.
Validation
Use focused proof:
praxis-table.events.spec.ts
- selection, floating bulk, row action, or toolbar specs.
table-global-action-adapter.spec.ts
- export/runtime operation specs and AI operation specs when assistant behavior changes.
- config editor specs when export/actions are authored.
- browser validation when selection affordances or download UX are user-visible.
For first-step issue resolution, audit: selectedRows/selectedIds source, idField, current filters/query context, export scope, requested formats, capability availability, generated request, artifact validation, and user-visible disabled/error state.
Companion Skills
- Use
praxis-table-runtime-data for surrounding table runtime state.
- Use
praxis-table-filter-actions for toolbar/row/bulk action authoring and grounding.
- Use
praxis-core-global-action-payloads for structured action refs.
- Use
praxis-core-resource-runtime for collection export, capabilities, HATEOAS, and resource discovery.
1---2name: praxis-table-selection-export-runtime3description: "Use when Codex must implement, audit, or debug @praxisui/table selection and export operations: rowClick, selectionChange, selected rows/ids context, bulk actions, export formats/scopes, PraxisCollectionExportService, filtered/currentPage/selected/all scopes, collection capabilities, toolbar export UI, or AI selected-record context."4metadata:5 source: https://skillmd.com/skills/codexrodrigues/praxis-table-selection-export-runtime6---78# Praxis Table Selection Export Runtime910Use this skill when the issue depends on selected rows, bulk operations, row events, or governed export from `@praxisui/table`.1112Selection and export are runtime evidence. They should be derived from table state, capabilities, and declared export configuration, not from DOM order, viewport text, guessed IDs, or local action labels.1314## Source Audit1516Inspect before editing:1718- `projects/praxis-table/AGENTS.md`19- `projects/praxis-table/src/lib/praxis-table.ts`20- `projects/praxis-table/src/lib/praxis-table.metadata.ts`21- `projects/praxis-table/src/lib/table-global-action-adapter.ts`22- `projects/praxis-table/src/lib/toolbar-actions-editor/**`23- `projects/praxis-table/src/lib/praxis-table-config-editor.*`24- `projects/praxis-table/src/lib/ai/table-context-pack.ts`25- `projects/praxis-table/src/lib/ai/table-agentic-authoring-turn-flow.ts`26- focused selection, bulk, export, global action, config editor, and AI context specs.27- `projects/praxis-table/src/lib/bulk-sync/table-bulk-sync-workflow.component.ts`, its template and spec28- `projects/praxis-table/src/lib/praxis-table.bulk-sync.spec.ts`29- `projects/praxis-table/test-dev/e2e/table-bulk-sync-governed.playwright.spec.ts`3031Inspect `@praxisui/core` collection export models/services and global action payload contracts when export or actions cross package boundaries.3233## Selection Rules3435- Use canonical outputs: `rowClick`, `selectionChange`, `widgetEvent`, `resourceEvent`, and `recordSurfaceOpen` as applicable.36- Preserve `selectionChange` shape with trigger, selectedRows, selectedCount, optional row, and tableId.37- For Material single selectors, consume the semantic `change` output rather than treating a host `click` as a selection change. The enlarged touch target can stop that click, while a label can forward an additional native click. Keep row-click propagation separate, and test native input, label, touch target, repeated activation and the existing keyboard-clear path. Assert one canonical selection event and matching selected rows; a checked DOM radio alone is not evidence that Table state or its consumers updated.38- Distinguish selection modes and focus targets in browser proof. With single selection and `mode: row`, Enter/Space on the row selects it; it does not clear it. `mode: both` exposes the explicit selector alongside row activation. Space on the focused checked selector uses the existing deselection path. Verify the selector state, canonical selected count, and downstream detail empty state together. Do not promise repeated-click deselection or implement host-local state clearing to compensate for an unexposed selector.39- Use selected row snapshots and sanitized selected-record context for AI; do not expose raw internal fields unless explicitly required.40- Treat `selectedRecordsContext` as governed read-only grounding for analysis of the current selection. Questions to understand, summarize, compare, inspect, rank, or explain selected records should answer with `info` grounded in sanitized `sampleRows`; do not convert them into `componentEditPlan`, `table.filter.apply`, export, row action, navigation, or backend mutation unless the user explicitly asks to apply/configure/create/open/export.41- When a request explicitly asks to turn selected records into filters, use declared `selectedRecordsContext.filterCandidates` as the canonical bridge to advanced filters; prefer candidate labels and criteria over re-inferring values from prose, selected ids, sample rows, or visible cell text. If the shared property is ambiguous, ask a concise clarification grounded in filter-field labels or export scopes.42- When selected records also expose `recordSurfaces`, requests to open, consult, view, navigate to, or inspect a related surface should ground on the declared surface ids before considering selection-derived filters.43- Bulk actions are disabled when no rows are selected unless a governed action says otherwise.44- Reconcile selection after data refresh by stable row identity, not visual index.45- On remote pagination, clear non-persistent selection through the existing selection event before requesting the new page when both `persistSelection` and `persistOnDataUpdate` are off. Do not retain obsolete detail context until the response in that policy.46- Preserve both opt-in policies during loading: `persistSelection` may retain rows across pages; `persistOnDataUpdate` must reconcile against returned row identities. Cover the event-before-request order and avoid a duplicate clear on completion. Do not generalize pagination timing to every refresh/filter/sort without auditing those lifecycles.47- For related resource or surface actions, separate row-selection transport from authorization. Availability comes from capabilities, surfaces, actions, or `_links`.4849Selection and filter announcements use semantic record/point identity and50current governed state. Preserve focus across CRUD overlays and data refresh;51do not rebuild selection from rendered row indexes.5253## BASIC Uniform Bulk Workflow5455For the first uniform UI, consume `UNIFORM_UPDATE / SYNC / EXPLICIT / PER_ITEM`56through the existing Core bulk client/session and published editable-field schema.57Capture selection by exact wire identity, canonical self links and strong resource58ETags, with complete operation/resource and enterprise scope, including organization.59Evaluation prepares a protected preview without domain effects. Confirmation is a60separate explicit action using the original proposal and one stable key per intent;61uncertain responses/replay do not authorize a fresh proposal or automatic mutation.6263Keep intent custody separate from the currently authorized screen projection. A64401/403/404/410 from proposal, preview, execution or results must hide retained65intent/form values, diagnostics, totals, rows and cursors and disable confirmation.66Invalidate the projection epoch on denial or context loss; ignore every late response67from an earlier epoch, including 200. Returning to the same scope requires complete68fresh authorized proposal/preview or execution/results reads before any redisplay.69An organization A → unavailable → B transition must not show or confirm A's intent.70For an intent with uncertain confirmation or a pending execution, returning to A71retains original custody/key but requires that fresh reauthorization. An unconfirmed72proposal may be discarded on context change; do not promise universal retention.73Do not treat a refreshed metadata label as a different business intent.7475Apply the existing `config.behavior.loading.requestTimeoutMs` budget to BASIC76consultations, including selected-item versions, preview pages, execution/results77and fresh authorization. Capture the policy when starting each consultation;78default 30000 and explicit zero retain the existing Table semantics. Keep the79internal workflow input connected to the current Table config rather than freezing80it inside retained intent custody. No separate bulk timeout editor or metadata knob81is needed.8283Destruction, authorization-epoch invalidation and deadline expiry must abort the84active GET transport, release busy state and reject late projection updates. For85session reads, pass the abort signal through the Core Promise API to its HTTP86subscription. `pendingSessionWork` is only for dispatched evaluate/confirm POSTs:87remount must not wait forever on an obsolete GET, and a GET timeout must not cancel88or repeat an uncertain confirmation. Prove a never-responding transport, cancellation,89fresh retry, remount and preserved POST/key with controlled unit tests and a focal90browser scenario. Record browser mocks separately from backend effect evidence.9192Render all nine global execution totals from the authorized backend snapshot:93`targetCount`, `pending`, `confirmed`, `unchanged`, `denied`, `invalid`, `conflict`,94`notProcessed`, and `unknown`. A partial results page never determines those totals95or proves that unloaded targets succeeded. Keep cursor pages bound to the intent96and context; the legacy `details[{id,ok,error}]` collection outcome is a separate path.9798Prove open-screen revocation for all four statuses, late-200 epoch rejection,99organization transitions, complete reauthorization and mixed global totals with an100incomplete page in the workflow/Table specs. Use the existing governed Playwright101fixture for keyboard/narrow-screen UI proof, and record it as mocked transport;102real protected HTTP and backend effect/replay proof require separate receipts.103Review Core/Table READMEs and the real host composition as derived references.104Review the exact runtime source and focused evidence before adoption; real HTTP105acceptance remains a separate gate from these UI proofs.106107## Per-Item Collection Outcomes108109Inspect `table-collection-outcome.component.ts`, Table's remote regression specs and110Core's `resource-action-open-adapter.service.ts` when a bulk command declares111`PER_ITEM`. HTTP success does not mean all selected records succeeded. Materialize112the existing `details[{id,ok,error}]` outcome near the table with counts, expandable113item results and non-color failure labels. Preserve only failed identities for a114retry; the prior successful records must not be submitted again. Clear or ignore115stale outcomes when the resource/action context changes.116117The Core adapter carries existing `selection.idsField` and `selection.versionsField`118into `groupedCommand.contextFields` and suppresses the generic success toast for119`PER_ITEM`; Table owns the outcome presentation. Do not reconstruct selection/version120payloads or translate backend reasons by keyword in the host.121122Prove mixed success/failure, selection retention, retry scope, keyboard and narrow123layout with exclusive test records. Cleanup belongs in `finally` with enough timeout124budget, then verify GET 404. Include context/payload tests and prove that a retry does125not change the successful record's version. Public Table/Core READMEs and the bulk126composition recipe are derived references to review with this path.127128## Export Rules129130- Use `PraxisCollectionExportService` and core export request/result contracts.131- Honor declared formats and scopes: `selected`, `filtered`, `currentPage`, `all`, and `auto`.132- `selected` scope must come from selected row state or selected ids; `filtered` scope must come from effective filters/query context; `currentPage` from the current paged data.133- Do not add direct CSV/PDF/XLS generation in a host or table branch when core collection export already owns the operation.134- Treat host-declared export config as a contract. If host export config changes, reconcile persisted table config accordingly.135136## Aderence Inventory137138Classify before adding selection/export behavior:139140- `ja-suportado-so-ux`: event/export state exists but UI, toolbar, empty state, or assistant does not expose it.141- `ja-suportado-mal-nomeado-ou-mal-materializado`: a local selected-id or export shape should map to core collection export or table selection outputs.142- `suportado-parcialmente`: selection/export exists but scope mapping, persistence, AI context, capabilities, docs, or direct consumer proof is incomplete.143- `lacuna-real-de-contrato`: no table/core event, export scope, request, or capability can express the operation.144145Only real gaps justify new public contracts. Otherwise fix materialization or consumer wiring.146147## Validation148149Use focused proof:150151- `praxis-table.events.spec.ts`152- selection, floating bulk, row action, or toolbar specs.153- `table-global-action-adapter.spec.ts`154- export/runtime operation specs and AI operation specs when assistant behavior changes.155- config editor specs when export/actions are authored.156- browser validation when selection affordances or download UX are user-visible.157158For first-step issue resolution, audit: selectedRows/selectedIds source, idField, current filters/query context, export scope, requested formats, capability availability, generated request, artifact validation, and user-visible disabled/error state.159160## Companion Skills161162- Use `praxis-table-runtime-data` for surrounding table runtime state.163- Use `praxis-table-filter-actions` for toolbar/row/bulk action authoring and grounding.164- Use `praxis-core-global-action-payloads` for structured action refs.165- Use `praxis-core-resource-runtime` for collection export, capabilities, HATEOAS, and resource discovery.