Skip to content

Duty picker fixes and one shared search-result row - #741

Merged
justinaskav merged 9 commits into
devfrom
fix/duty-picker
Nov 6, 2026
Merged

justinaskav merged 9 commits into
devfrom
fix/duty-picker

Conversation

@justinaskav

Copy link
Copy Markdown
Member

Summary

Duty picker in "Pridėti pareigybę" (user record)

  • Typesense matches all query words inside one field, so "atstovas matematikos" / "pirmininkas MIF" found nothing. Duty search_text_lt/en now also carries the institution name and padalinys shortname (SearchText::forModel).
  • The picker shows "Rodyti daugiau (:shown iš :total)" (keyboard reachable) instead of silently stopping at 8.
  • Rows use the shared SearchHitRow: highlighted matches, current holders, inactive-institution badge.
  • "Viešame puslapyje naudoti originalų pareigybės pavadinimą" moved out of Papildomi nustatymai.

One search-result row, a few shells

  • InlineSearchField — the inline picker shell (sheets/forms); DutySearchField and MemberSearchField are thin wrappers with unchanged APIs.
  • UserSearchField — people from users.search (with create-new), via normalizeUserApiHit; replaces ProblemForm's hand-rolled reka combobox.
  • useSearchHitMatches + SearchHitCardText — ActionWindow institution search cards get highlights/status like SearchHitRow.
  • InvolvedUsersPicker shows email when present (support-request payloads don't send it today; backend left unchanged).
  • .ai/rules/pickers.md: don't hand-roll result rows.

Changelog (LT/EN) and guide pages (Pareigybės, Nariai, Problemos, Platforma) updated.

Who made what

  • Plan, diff review, test runs, small review fixes (restored constraint comments in InstitutionSearchScreen, braces, wording, one test assertion): Claude.
  • Implementation: Codex.

Deploy notes

  • Reindex duties for the combined search: php artisan scout:import "App\Models\Duty".

Check by hand

  • User record → Pridėti pareigybę: type "atstovas " and a broad term ("atstovas"); try Rodyti daugiau with mouse and ↑/↓/Enter; phone width.
  • Visible differences:
    • the padalinys badge on duty rows now shows only for duties from another padalinys (as in admin search);
    • ProblemForm's responsible person results now appear inline under the field, not in a floating dropdown;
    • people without a photo get the generic person icon.
  • ActionWindow → new meeting → institution search: highlighted matches.

Tests

  • Vitest: all specs related to the changed files (115 files, 974 tests) pass; new DutySearchField.component.test.ts, updated AssignDutyUserSheet, SearchHitRow, ProblemForm tests.
  • Pest: tests/Feature/Search/SearchExperienceTest.php (new duty search-text case).

🤖 Generated with Claude Code

justinaskav and others added 2 commits November 6, 2026 21:00
…hared rows

- Duty search_text now includes the institution name and padalinys shortname,
  so "atstovas matematikos" / "pirmininkas MIF" match (Typesense matches all
  tokens inside one field; duty and institution names were separate fields).
- DutySearchField renders the shared SearchHitRow (highlights, current holders,
  tenant and inactive badges) and offers "Rodyti daugiau" with keyboard support.
  SearchHitRow gets an optional trailing="none" for pickers.
- AssignDutyUserSheet: "use original duty title" moved out of Papildomi nustatymai.
- Changelog and Pareigybės / Nariai guide pages updated.

Deploy: reindex duties (scout:import "App\Models\Duty") for the combined search.

Written by Codex. Claude review: plan, diff review, test runs, fixed one
assertion that relied on placeholder replacement the test i18n mock doesn't do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- InlineSearchField: the inline combobox shell (keyboard nav, show more,
  selected card) rendering SearchHitRow; DutySearchField and MemberSearchField
  are now thin wrappers with unchanged APIs.
- UserSearchField: people from api.v1.admin.users.search (with create-new),
  mapped via normalizeUserApiHit; ProblemForm's hand-rolled reka combobox for
  the responsible person now uses it.
- useSearchHitMatches + SearchHitCardText: ActionWindow institution search
  cards show highlighted matches and status like SearchHitRow.
- InvolvedUsersPicker shows email under the name when the payload has it
  (the support-request payloads don't include email today).
- pickers.md rule: don't hand-roll search result rows. Changelog and guides.

Written by Codex. Claude review: restored constraint comments Codex trimmed in
InstitutionSearchScreen, braces on one-line ifs, EN changelog wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 560 bytes (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
vusa-frontend-esm 7.84MB 560 bytes (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: vusa-frontend-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/app-*.css -139 bytes 319.12kB -0.04%
assets/en-*.js 68 bytes 88.51kB 0.08%
assets/AdminLayout-*.js 1 bytes 79.9kB 0.0%
assets/ComboboxViewport-*.js -24 bytes 60.42kB -0.04%
assets/Occupancy-*.js -7.08kB 29.27kB -19.49%
assets/IndexNavigation-*.js -38 bytes 26.87kB -0.14%
assets/PageForm-*.js -38 bytes 15.66kB -0.24%
assets/lt-*.js 74 bytes 11.96kB 0.62%
assets/ProblemForm-*.js -2.0kB 11.39kB -14.95%
assets/SearchSplitView-*.js 58 bytes 10.2kB 0.57%
assets/Select-*.js 5.28kB 10.11kB 109.32% ⚠️
assets/searchHitMappers-*.js 370 bytes 7.61kB 5.11% ⚠️
assets/ActivityRequestInstitutionsScreen-*.js 18 bytes 7.26kB 0.25%
assets/alert-*.js 275 bytes 1.64kB 20.19% ⚠️
assets/SearchHitRow-*.js -192 bytes 5.3kB -3.49%
assets/CheckInUntilScreen-*.js 161 bytes 5.25kB 3.16%
assets/useDuplicateDutyCheck-*.js -34 bytes 5.04kB -0.67%
assets/InlineSearchField-*.js (New) 4.89kB 4.89kB 100.0% 🚀
assets/ActivityRequestPeopleScreen-*.js 18 bytes 4.79kB 0.38%
assets/PermalinkField-*.js -38 bytes 3.83kB -0.98%
assets/InstitutionSearchScreen-*.js 870 bytes 3.81kB 29.54% ⚠️
assets/ActionChoiceButton-*.js 123 bytes 3.49kB 3.65%
assets/useDuplicateUserCheck-*.js 360 bytes 3.45kB 11.64% ⚠️
assets/MeetingWhenScreen-*.js 214 bytes 3.07kB 7.5% ⚠️
assets/InstitutionPickerScreen-*.js 66 bytes 3.05kB 2.21%
assets/TextBoxEditor-*.js -38 bytes 2.63kB -1.42%
assets/DutySearchField-*.js -2.7kB 2.29kB -54.08%
assets/ActivityRequestCampaignScreen-*.js 152 bytes 1.88kB 8.78% ⚠️
assets/ActivityRequestModeScreen-*.js 164 bytes 1.38kB 13.52% ⚠️
assets/InvolvedUsersPicker-*.js 159 bytes 1.19kB 15.41% ⚠️
assets/usePermalinkPreview-*.js 4 bytes 626 bytes 0.64%
assets/useSearchHitMatches-*.js (New) 497 bytes 497 bytes 100.0% 🚀
assets/useDebouncedQuery-*.js (Deleted) -510 bytes 0 bytes -100.0% 🗑️
assets/AlertTitle-*.js (Deleted) -423 bytes 0 bytes -100.0% 🗑️

Files in assets/en-*.js:

  • ./lang/en.json → Total Size: 88.27kB

Files in assets/AdminLayout-*.js:

  • ./resources/js/Components/ActionWindow/ActionWindowBody.vue → Total Size: 154 bytes

Files in assets/lt-*.js:

  • ./lang/lt.json → Total Size: 11.92kB

Files in assets/ProblemForm-*.js:

  • ./resources/js/Components/AdminForms/ProblemForm.vue → Total Size: 137 bytes

Files in assets/ActivityRequestInstitutionsScreen-*.js:

  • ./resources/js/Components/ActionWindow/screens/ActivityRequestInstitutionsScreen.vue → Total Size: 213 bytes

Files in assets/CheckInUntilScreen-*.js:

  • ./resources/js/Components/ActionWindow/screens/CheckInUntilScreen.vue → Total Size: 168 bytes

Files in assets/ActivityRequestPeopleScreen-*.js:

  • ./resources/js/Components/ActionWindow/screens/ActivityRequestPeopleScreen.vue → Total Size: 195 bytes

Files in assets/InstitutionSearchScreen-*.js:

  • ./resources/js/Components/ActionWindow/screens/InstitutionSearchScreen.vue → Total Size: 183 bytes

Files in assets/ActionChoiceButton-*.js:

  • ./resources/js/Components/ActionWindow/ActionChoiceButton.vue → Total Size: 160 bytes

Files in assets/MeetingWhenScreen-*.js:

  • ./resources/js/Components/ActionWindow/screens/MeetingWhenScreen.vue → Total Size: 165 bytes

Files in assets/InstitutionPickerScreen-*.js:

  • ./resources/js/Components/ActionWindow/screens/InstitutionPickerScreen.vue → Total Size: 183 bytes

Files in assets/ActivityRequestCampaignScreen-*.js:

  • ./resources/js/Components/ActionWindow/screens/ActivityRequestCampaignScreen.vue → Total Size: 201 bytes

Files in assets/ActivityRequestModeScreen-*.js:

  • ./resources/js/Components/ActionWindow/screens/ActivityRequestModeScreen.vue → Total Size: 189 bytes

@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

justinaskav and others added 6 commits November 6, 2026 21:10
- AssignDutyUserSheet: "use original duty title" sits below the dates.
- SearchSplitView panes are bg-card, so picker results no longer sit on the
  grey paper inside a white dialog; ActionChoiceButton is bg-card in light mode.
- SearchResultListItem: one 18px square mark for both modes (check for many,
  filled square for one) inside a 32/44px target, with checkbox/radio roles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MeetingWhenScreen and CheckInUntilScreen turned the chevron off, so
ActionChoiceButton drew a check box, but never passed which preset matched
the draft; the box stayed empty after going back. Presets now compare with
draft.meeting.start_time / draft.checkIn.endDate, and the "other date" choice
is marked when none matches. Institution picker, institution search and the
activity-request campaign screen mark the earlier choice too (true | undefined,
so the rest keep their chevrons).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vue casts an omitted boolean prop to false, so ActionChoiceButton's
`selected !== undefined` was always true: every card, even on "Ką norėtum
padaryti?", drew an empty check box instead of a chevron. `showChevron` is
replaced by `indicator: 'chevron' | 'check'`. Steps that move on keep the
chevron and mark the earlier answer with a brand outline and aria-current;
the activity-request institution/people toggles and the agenda item type
dialog use check boxes with aria-pressed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An answer that fills in the record (institution, meeting type, date, time,
check-in end, request type and mode) shows a check box and marks the earlier
answer. Menus (Ką norėtum padaryti?, persona actions, report branching) and
options that open another screen (Kita institucija, other date or time) keep
the chevron.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@justinaskav
justinaskav added this pull request to stack #748 November 6, 2026 20:47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@justinaskav
justinaskav merged commit 0446af0 into dev Nov 6, 2026
29 of 30 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.

1 participant