39 lines
1.6 KiB
Markdown
39 lines
1.6 KiB
Markdown
# 063 — Declared params list shows a redundant "group name" alongside type
|
|
|
|
## Summary
|
|
|
|
`webapp/src/components/Params.tsx:331-337` renders each param as
|
|
`{p.name} ({p.kind}, ...)`, where the third segment is one of `elapsed
|
|
since previous`, nothing (for booleans), `json field {path}`, or `group
|
|
{p.capture_group}`. There is no distinct "group" concept in the domain
|
|
model — `src/dto.rs`, `src/profile.rs`, and `src/engine.rs` have no
|
|
`group` field at all. What the UI calls "group" is actually
|
|
`capture_group` (`dto.rs:22`, `profile.rs:69`), the regex named-capture
|
|
group used to extract the param's value. By convention, params are
|
|
declared with `(?P<name>...)`, so `capture_group` is almost always
|
|
identical to `p.name` — displaying it is redundant noise in the common
|
|
case (`name (type, name)`).
|
|
|
|
## Scope
|
|
|
|
- Change the default rendering to `name (type)`.
|
|
- Only append the extra suffix when it's actually informative:
|
|
- Keep `json field {path}` and `elapsed since previous` suffixes —
|
|
these carry information not implied by `name`/`type`.
|
|
- For the capture-group case, only show it when
|
|
`p.capture_group !== p.name` (i.e. the regex group name genuinely
|
|
differs from the declared param name); otherwise omit it.
|
|
- Out of scope: changing the underlying `capture_group` field or param
|
|
declaration model — this is a display-only fix.
|
|
|
|
## Acceptance criteria
|
|
|
|
- A param whose capture group matches its name renders as `name (type)`.
|
|
- A param whose capture group differs from its name still shows that
|
|
distinction (e.g. `name (type, group other_name)`).
|
|
- `json field` and `elapsed since previous` suffixes are unchanged.
|
|
|
|
## Depends on
|
|
|
|
None.
|