Conversation
…webitel.atlassian.net/browse/WTEL-10353) The log's filters panel rendered in the dynamic chip mode: filters had to be added one chip at a time, and the seeded date range was not legible as a control. It now renders in `static-mode`, with every filter labelled by its own name. All seven filters are kept, in the same order and under the same names — the names are the request params. The date range is seeded with the relative `rdt_today` rather than an absolute `{ from, to }`. `normalizeDatetimeRange` expands it per request, so a shared url keeps meaning "today" instead of freezing on the day it was copied, and the static panel preselects the Today preset. The seed moves to `configs/defaultFilters.ts` so the initial seed and the reset share it. The red indicator was bound to `filtersManager.hasFilters`, which does not exist on `FiltersManager` — `!undefined` is always true, so the badge never showed. It now tracks the filters the panel actually offers, counting the seeded default, so it is lit whenever a filter is applied. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
WTEL-10353 — QA reports that the Queues registries show their filters as chips instead of plain controls, that the default date range is not visible, and that the red "filters applied" indicator behaves wrongly.
This PR covers the Logs registry only. The Queues registry and the Members registry are deliberately left for a follow-up; the ticket stays open for them.
The log was already on Pinia +
@webitel/ui-datalist, so this is not a datalist migration — it is switching its existing panel to the SDK'sstatic-modeand fixing the indicator.What
Static panel.
the-queue-logs-filters.vuepassesstatic-mode, and all seven filters inconfigs/filtersOptions.tsare wrapped increateFilterConfig({ … showFilterName: true })so each control is labelled with its own name rather than a shared "Values". A 3-column grid override replaces the panel's default 4, which read badly with three tall date fields.Every existing filter is preserved — same names, same order, nothing added or removed:
joinedAt,agent,bucket,leavingAt,offeringAt,result,duration, plus the action bar'ssearch. A filter's name is its request param, so the existingfiltersOptions.spec.tscontract test still passes unchanged. Note this keepsbucket/leavingAt/offeringAt, which the ticket describes as "extra" — that was a deliberate call, since they are filters the log genuinely supports.The default date range is now relative.
configs/defaultFilters.tsseedsjoinedAtwithRelativeDatetimeValue.Todayinstead of an absolute{ from: startOfToday(), to: endOfToday() }.normalizeDatetimeRangein@webitel/api-servicesalready expands relative values intojoined_at.from/.to, so the request is identical, but a bookmarked or shared url keeps meaning "today" rather than freezing on the day it was copied — and the static panel preselects the Today preset, which is what makes the default visible at all. The initial seed andresetFilters()share the one helper.The red indicator actually works now.
opened-queue-logs.vuebound<wt-badge :hidden="!filtersManager.hasFilters">, butFiltersManagerhas nohasFiltersgetter — onlyhasFilter(name)— so!undefinedwas alwaystrueand the badge never appeared. It now tests the filters the panel offers (excluding the action bar'ssearch, mirroring the SDK'slistSelectedFilters), counting the seedednotDeletabledefault. That satisfies both ticket rules: nothing applied → hidden; a default applied → always shown.Depends on
webitel/webitel-ui-sdk#1765 — the static-mode field fixes. Without it the date fields seed themselves on mount, so
leavingAtandofferingAtsilently apply and sendleaving_at.*/offering_at.*, and every empty field shows a red required error. This PR should not be merged before that one is released and picked up. No version bump is included here:clientpins@webitel/ui-datalistat~26.8, so a patch on the 26.8 train is picked up by the lockfile alone.Tests
configs/__tests__/defaultFilters.spec.ts(new) — the default filters on the start date, is relative rather than a frozen range, and still resolves to today when the request is built.configs/__tests__/filtersOptions.spec.ts— a new case asserting every logs filter opts intoshowFilterName, since they are all on screen at once.npm run typecheckclean,biomeclean,vitest run37 files / 154 tests passed.There is no component test for
the-queue-logs-filters.vue: this app runs@vue/compatMODE 2, where vue-test-utils stubbing has no effect, so the real SDK panel always renders and dies in compat'srenderSlot. The behaviour it would have covered is tested in the SDK instead, and the wiring was checked in the browser.Verified in the browser
Against
test.webitel.me, client linked to the SDK branch, queue → Logs:Agent,Bucket,Result,Duration: From/Toall labelled by name, none showing a validation error;joined_at.from/joined_at.toand noleaving_at.*/offering_at.*;offering_at.from/.toand persists asofferingAt_valin the url;offeringAtand re-seedsjoinedAttordt_today; the red badge stays lit throughout;Known gap
The ticket names the log's date filters "Start: From" / "Start: To", matching the table's column headers. They currently read "Joined at", because
src/app/plugins/webitel/ui-sdk.ts:30merges the ui-sdk locale after the app's, andmergeLocaleMessageoverwrites — so the app's entirewebitelUI.filtersoverride block is dead for any key ui-sdk also defines (the pre-existingtags/result/durationoverrides there are equally ineffective). Fixing the wording means either changing that merge precedence app-wide or teachingcreateFilterConfigto carry a per-filterlabel; both are bigger than this PR and neither is a regression from it, so it is left as a separate decision.🤖 Generated with Claude Code