Skip to content

feat(plugin-id/ui): lazy server-backed autosuggest for group parent field#33

Merged
fdaugan merged 1 commit into
feature/vuejsfrom
norman/feat-group-parent-lazy-autosuggest
May 22, 2026
Merged

feat(plugin-id/ui): lazy server-backed autosuggest for group parent field#33
fdaugan merged 1 commit into
feature/vuejsfrom
norman/feat-group-parent-lazy-autosuggest

Conversation

@Terracosmos
Copy link
Copy Markdown
Collaborator

make the group Parent field a lazy server-backed autosuggest.

Problem

GroupEditView preloaded ALL groups via a bulk GET rest/service/id/group
at mount to populate the Parent field. Unacceptable at DGFIP scale
(100k+ groups in LDAP).

Change

The Parent field is now a server-backed v-autocomplete with lazy
loading:

  • Nothing loaded at mount
  • First batch (20) loaded when the dropdown is opened
  • Debounced search (300ms) on keystroke, delegated to the API
  • Edit mode: the current parent is pre-seeded as a single stub item so
    it displays without loading the full list

v-model stays a string (group name) — the save payload is unchanged.
Demo fallback gated behind import.meta.env.DEV.

Verified (headless Chrome, network capture)

  • Loading /id/group/new → only the demo-probe group?rows=1&page=1, no
    bulk load
  • Opening the Parent dropdown → first lazy batch (rows=20)
  • Typing → debounced search query
  • Edit of a group with a parent → parent displays correctly, still no
    bulk load

Files

1 file, +80/-12 — GroupEditView.vue.

…ield

Per Fabrice's review (chantier H): the group "Parent" field used to
preload every group with a parameterless GET rest/service/id/group at
mount — unworkable at DGFIP scale (100k+ groups in LDAP).

- Remove the mount-time bulk group preload.
- Turn the Parent field into a server-backed v-autocomplete: no-filter,
  single-select, item-title/value="name" (the v-model and the save
  payload stay a plain string name).
- Lazy loading: nothing is fetched until the dropdown opens, which then
  loads the first page (20 groups); typing runs a 300 ms debounced
  search delegated to the API.
- Edit mode: pre-seed only the current parent as a single {name} stub so
  the field renders its label without loading the whole list.
- Dev-only demo fallback gated behind import.meta.env.DEV.
@Terracosmos Terracosmos requested a review from fdaugan May 21, 2026 08:54
@sonarqubecloud
Copy link
Copy Markdown

@sonarqubecloud
Copy link
Copy Markdown

@fdaugan fdaugan merged commit bccb893 into feature/vuejs May 22, 2026
4 of 5 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