# Praxis Table Selection Export Runtime

> Praxis Table Selection Export Runtime

- Skill: `codexrodrigues/praxis-table-selection-export-runtime` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx get-skill add codexrodrigues/praxis-table-selection-export-runtime`
- Raw SKILL.md: https://api.skillmd.com/api/skills/codexrodrigues/praxis-table-selection-export-runtime/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: codexrodrigues (https://skillmd.com/u/codexrodrigues)
- Updated: 2026-11-15
- Page: https://skillmd.com/skills/codexrodrigues/praxis-table-selection-export-runtime

---


# 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.

