Skip to content

feat(fields): make document type selectors searchable - #256

Merged
lattln merged 5 commits into
mainfrom
ecase-bulk-ticket-resolution
Nov 12, 2026
Merged

lattln merged 5 commits into
mainfrom
ecase-bulk-ticket-resolution

Conversation

@lattln

@lattln lattln commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Enable shared Select search for configured composer types and authorized native document categories in compose/upload workflows.
  • Search display labels and native/configured codes without changing stored codes or MIME types.
  • Preserve workflow filtering, fixed and existing native types, draft contents, and explicitly supported free-text fallback behavior.

Validation

  • 117 focused document provider, runtime, draft, and workflow tests pass.
  • Changed files pass lint and formatting; document package type-check and build pass.
  • Consuming eCase SPA type-check and production build pass.
  • Browser checks cover a 251-type catalog, label/code search, keyboard selection, no-match blocking, and selection retention in light/dark mode.

Integration

Supports mieweb/eCase#124. Consumed by mieweb/eCase#127 and mieweb/wcts#217.

The companion autofocus correction is mieweb/ui#748; the eCase integration pins both dependencies.

Enable the shared Select search mode for configured composer types and authorized native document categories in compose and upload workflows. Include type codes with display labels so both are searchable without changing stored codes or MIME types.

Preserve fixed and existing native types, workflow filtering, draft contents, and explicit free-text fallback behavior. Cover long catalogs, unavailable choices, keyboard selection, and selection persistence with regression tests.

Supports mieweb/eCase#124.
Copilot AI balanced review requested due to automatic review settings November 11, 2026 22:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Both searchable selectors have unresolved focus and modal-accessibility issues, and an empty-result keyboard sequence can crash the shared Select.

3 open issues
What changed in this PR

Makes document type selection searchable in compose and upload workflows, supporting the consuming applications without changing stored type codes or MIME types.

Changes:

  • Enables shared Select search for configured document types and authorized native categories.
  • Includes configured type codes in display labels so users can search by label or code.
  • Adds tests for filtering, keyboard selection, no-match behavior, draft retention, and long catalogs.
File Description
packages/​fields-documents/​src/​DocumentListWorkflows.tsx Enables searchable selectors and displays configured type codes alongside labels.
packages/​fields-documents/​src/​DocumentListWorkflows.spec.tsx Adds search regression coverage for compose and upload workflows.

Review effort: Balanced

value={value}
onValueChange={setSelected}
placeholder={loading ? config.loading : config.placeholder}
searchable

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ff184f5, with shared source corrections in mieweb/ui#752. The documents package and workspace now consume published @mieweb/ui@0.11.0-dev.66, with a locked pnpm backport of the focus correction and empty-result/modal-scope fixes until all are available in a published release. Removed the link:../ui override and declared the Markdown peers exposed by registry consumption. All 221 documents-package tests, package typecheck, lint, build, and frozen-lockfile install passed. Tests cover no-match ArrowDown/Home/ArrowUp/End then Enter, initial search focus, and forward/backward modal focus boundaries in compose and upload. Real-browser tests also verified empty-result Tab containment and transformed popup geometry.

value={value}
onValueChange={setSelected}
placeholder={loading ? config.loading : config.placeholder}
searchable

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ff184f5, with shared source corrections in mieweb/ui#752. The documents package and workspace now consume published @mieweb/ui@0.11.0-dev.66, with a locked pnpm backport of the focus correction and empty-result/modal-scope fixes until all are available in a published release. Removed the link:../ui override and declared the Markdown peers exposed by registry consumption. All 221 documents-package tests, package typecheck, lint, build, and frozen-lockfile install passed. Tests cover no-match ArrowDown/Home/ArrowUp/End then Enter, initial search focus, and forward/backward modal focus boundaries in compose and upload. Real-browser tests also verified empty-result Tab containment and transformed popup geometry.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Deploying esheet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1064eae
Status: ✅  Deploy successful!
Preview URL: https://c83b79a1.esheet.pages.dev
Branch Preview URL: https://ecase-bulk-ticket-resolution.esheet.pages.dev

View logs

@lattln lattln changed the title feat(documents): make document type selectors searchable feat(field): make document type selectors searchable Nov 12, 2026
@lattln lattln changed the title feat(field): make document type selectors searchable feat(fields): make document type selectors searchable Nov 12, 2026
Copilot AI balanced review requested due to automatic review settings November 12, 2026 03:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Published consumers would still receive the unpatched UI dependency, and screen-reader users cannot identify the highlighted search result.

2 open issues
3 resolved since last review
1 file not reviewed
  • pnpm-lock.yaml: Generated file

Review effort: Balanced

Comment thread packages/fields-documents/package.json Resolved
value={value}
onValueChange={setSelected}
placeholder={loading ? config.loading : config.placeholder}
searchable

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in shared UI commit 47739bff (mieweb/ui#752), backported and bundled by 603b646. Options have stable IDs, and both the focused search textbox and trigger reference the active option through aria-activedescendant; search also exposes aria-controls and aria-autocomplete. Grouped/disabled options, filtering, keyboard movement, and clearing stale active references on no matches are covered. Added consumer workflow assertions for configured type and category selectors. All 37 shared Select tests and 221 documents tests pass; live browser checks confirm the focused search reference follows keyboard selection in both Compose and Upload.

Copilot AI balanced review requested due to automatic review settings November 12, 2026 03:44
@lattln

lattln commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Follow-up: the autofocus release is now available from npm. Commit 5472047 upgrades the workspace and documents package to published @mieweb/ui@0.11.0-dev.67 (including mieweb/ui#748), removes the autofocus backport, and retains only the temporary patch for mieweb/ui#752. Revalidated against the patched registry package: all 221 documents-package tests, typecheck, lint, build, formatting, and frozen install pass. No local UI link override is used.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Select fixes do not reach published-package consumers, and searchable dropdowns still have fallback positioning and screen-reader navigation issues.

3 open issues
1 file not reviewed
  • pnpm-lock.yaml: Generated file

Review effort: Balanced

Comment thread patches/@mieweb__ui@0.11.0-dev.67.patch Resolved
Copilot AI balanced review requested due to automatic review settings November 12, 2026 03:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The bundled modal can corrupt shared scroll-lock behavior, and the popover fallback can misposition or clip menus in browsers without Popover API support.

2 open issues
2 resolved since last review
1 file not reviewed
  • pnpm-lock.yaml: Generated file

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 12, 2026 04:22
@lattln

lattln commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Per the requested scope, 1064eae removes the UI pnpm patch and installs the unmodified published @mieweb/ui@0.11.0-dev.67 package. The documents library again externalizes UI rather than bundling its own Modal. Validated 221 tests, typecheck, lint, library build, frozen installation, actual unpatched runtime resolution, and the external UI import in the bundle. This release contains the autofocus correction from mieweb/ui#748, but NOT the additional Select changes in mieweb/ui#752. I reopened the empty-result navigation, modal-scope, and active-option announcement threads so those upstream concerns are not incorrectly represented as fixed. Their added patch-only tests were removed; document workflow coverage and published-release autofocus assertions remain.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The pinned @mieweb/ui version lacks Select fixes, leaving searchable selectors vulnerable to keyboard-triggered crashes and modal accessibility issues.

4 open issues
2 resolved since last review
1 file not reviewed
  • pnpm-lock.yaml: Generated file

Review effort: Balanced

Comment thread packages/fields-documents/package.json Resolved
@lattln
lattln merged commit 5af8fef into main Nov 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants