Skip to content

feat(frontend): collapsible rule options, preset pills, selection & label updates#36

Merged
theodubus merged 2 commits into
feat/graphic_selection_devfrom
codex/add-redact-selection-feature
Feb 14, 2026
Merged

feat(frontend): collapsible rule options, preset pills, selection & label updates#36
theodubus merged 2 commits into
feat/graphic_selection_devfrom
codex/add-redact-selection-feature

Conversation

@theodubus

Copy link
Copy Markdown
Owner

Motivation

  • Simplify the rules UI by hiding less-frequent options in a single collapsible panel and make presets visually consistent with options.
  • Replace ambiguous kind badges (exact / regex) with a single, clearer label and localize selection labels.
  • Add support for creating rules from PDF text selection and send selection rectangles to the backend for precise redaction.

Description

  • Moved rule options into a collapsible > Options block under the search bar and applied the same pattern to the edit modal by wrapping RuleOptionsRow in a <details>/<summary> (changes in RulesSection.tsx and EditRuleModal.tsx).
  • Replaced preset checkboxes with clickable pill buttons and added PresetPill so presets behave like the other pill controls (changes in PresetsSection.tsx and styling).
  • Unified list labels so exact/regex rules show as Requête/Request and selections show as Sélection/Selection by updating kindLabel and locale files (fr.json / en.json).
  • Implemented page selection capture in PdfViewer that computes scaled UiRect[] for the selection, passes selection info up to App, and supports adding a selection rule; added UiRect / selection rule type and included rects in the API payload by adding RectInput and rects support to api.ts and types/uiRules.ts.
  • Pulled file controls into the top band (HeaderBar) with the selected file name and drag-and-drop / hidden file input behavior in App.tsx; also removed the duplicated hint fallback from the right panel by simplifying ResultPanel to not show the standalone hint.
  • Various UI/UX and preview enhancements in PdfViewer: preview highlight drawing refactor, preset-match highlighting (basic), preserving page scale when computing selection rects, and improved rule list/action button styling (RulesList.tsx, PdfViewer.tsx, styles.css).

Testing

  • Built the frontend with cd frontend && npm run build, and the production build completed successfully. ✅
  • Started the dev server with cd frontend && npm run dev -- --host 0.0.0.0 --port 4173, Vite reported ready. ✅
  • Captured a UI screenshot using a Playwright script to validate the new collapsible options, preset pills and selection UI (artifact produced). ✅

Codex Task

@theodubus
theodubus merged commit 75a2140 into feat/graphic_selection_dev Feb 14, 2026
2 checks passed
@theodubus
theodubus deleted the codex/add-redact-selection-feature branch February 14, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant