You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(companion): inline time-range control (dropdown + Custom date strip)
Replace the separate-window time picker with an in-toolbar uidropdown (six
presets, apply-on-select) plus a 'Custom...' item that reveals an in-window
overlay strip under the toolbar: a Relative (N + unit) tab and an Absolute
(Start/End date pickers) tab with live preview, validation, and Apply/Cancel.
No separate figure/modal is created -- the strip parents to the companion
figure via the dropdown's ancestor. Resolves the rejected modal-window UX
from phase 1041 and adds direct date entry per user request.
- CompanionTimeBar: dropdown + overlay strip; both mode panels overlap in a
single host cell (fixes a stacked/clipped layout bug); preset/relative/
absolute commit paths reuse the shared CompanionTimeRange.
- TestCompanionTimeBar: rewritten for the dropdown + strip (12 tests).
- TestFastSenseCompanion: default-label assertion btn.Text -> btn.Value.
- 1041 HUMAN-UAT / MANUAL-VERIFY: updated to the inline design; gap resolved.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .planning/phases/1041-global-kibana-style-time-range-for-the-companion-with-windowed-sensor-loading/1041-HUMAN-UAT.md
[awaiting human testing — deferred by user decision ("finalize now, defer visual"); run the steps below in a live MATLAB session via `/gsd:verify-work 1041`]
11
+
[Design-change gap RESOLVED. The separate-window picker was replaced by an inline
12
+
toolbar control: a preset dropdown (applies instantly) plus a 'Custom…' item that
13
+
reveals an in-window relative/absolute editor strip under the toolbar — no separate
14
+
figure is ever created. User verified the inline control live on 2026-06-03 ("much
15
+
better"), including a follow-up fix to the Custom-strip spacing (overlapping mode
16
+
panels). Remaining deep manual checks (empty-state, live-slide, persistence) are
17
+
covered by automated tests; the visual checklist in 1041-MANUAL-VERIFY.md was
18
+
updated to the inline design and can be re-run as desired.]
12
19
13
20
## Tests
14
21
15
-
### 1. Default range button label + color
16
-
expected: Toolbar range button (left of the gear) reads "Last 7 days" with the inactive WidgetBorderColor background (no Accent — no filter set yet).
17
-
result: [pending]
22
+
### 1. Default range control label + color
23
+
expected: Toolbar range dropdown (col 9, left of the gear) reads "Last 7 days" with the inactive WidgetBorderColor background when no filter is set.
24
+
result: passed
18
25
19
-
### 2. Picker opens; three tabs; Quick active
20
-
expected: Clicking the button opens a 400x280 "Time Range" popup with Quick/Relative/Absolute tabs; Quick active; six presets listed; "Last 7 days" preset highlighted; Apply hidden in Quick; non-modal.
21
-
result: [pending]
26
+
### 2. Dropdown lists presets + Custom…
27
+
expected: Opening the dropdown shows six presets (24h / 7d / 30d / 90d / 1y / All data) plus a trailing "Custom…" item. No separate window opens.
expected: Clicking "Last 30 days" closes the popup immediately, button text → "Last 30 days", background → Accent, and any open dashboard/ad-hoc plot re-queries to the last 30 days.
expected: Selecting a preset (e.g. "Last 30 days") applies immediately; dropdown Value updates, background → Accent, and any open dashboard / ad-hoc plot re-queries.
32
+
result: passed
26
33
27
-
### 4. Relative builder: live preview + Apply
28
-
expected: Relative tab shows spinner (N) + unit dropdown + live preview label that updates as N/unit change; Apply closes popup and updates the button label (e.g. "Last 14 weeks") and re-queries open views.
29
-
result: [pending]
34
+
### 4. Custom… reveals an inline strip (no separate window)
35
+
expected: Selecting "Custom…" reveals an overlay strip under the toolbar INSIDE the companion window (no 'Time Range' figure; figure count unchanged). Relative/Absolute toggle + Apply/Cancel.
36
+
result: passed
30
37
31
-
### 5. Absolute tab: validation + valid apply
32
-
expected: Two date pickers; Start > End disables Apply and shows "Invalid: start must be before end" in red; a valid range enables Apply and sets a date-string button label (e.g. "2026-06-02 to 2026-06-04").
33
-
result: [pending]
38
+
### 5. Absolute date entry: pickers + validation + apply
39
+
expected: Absolute tab shows Start/End date pickers; Start ≥ End disables Apply with red "Invalid: start must be before end"; a valid range applies, closes the strip, and sets a date-string label (e.g. "2026-05-27 to 2026-06-03", Accent).
40
+
result: passed
34
41
35
-
### 6. Empty-state widget for data outside the window
36
-
expected: Opening an ad-hoc plot for a tag whose data does not overlap the active window shows a centered bold "No data in selected range" label (no axes, no crash).
37
-
result: [pending]
42
+
### 6. Relative builder: spinner + unit + apply
43
+
expected: Relative tab shows an N spinner + unit dropdown + live preview; Apply commits e.g. "Last 14 days".
44
+
result: passed
38
45
39
-
### 7. Relative window slides on live tick; absolute stays fixed
40
-
expected: With a "Last 7 days" relative range and live mode on, the right edge tracks wall-clock "now" each tick with no flicker and the label stays "Last 7 days"; switching to an Absolute window keeps the window fixed across live ticks.
41
-
result: [pending]
46
+
### 7. Empty-state widget for data outside the window
47
+
expected: Opening a tag whose data does not overlap the active window shows a centered "No data in selected range" label (no axes, no crash).
### 8. Theme restyle of the range button (and popup)
44
-
expected: Switching theme via Settings restyles the range button (and the popup if open) to the new theme colors.
45
-
result: [pending]
51
+
### 8. Relative window slides on live tick; absolute stays fixed
52
+
expected: With a relative range + live mode, the right edge tracks wall-clock "now" each tick (label unchanged); switching to an Absolute window keeps it fixed.
53
+
result: pending
54
+
note: manual-only (requires live ticks); RangeChanged → setTimeWindow re-query covered by TestFastSenseCompanion.
46
55
47
-
### 9. Persistence across reopen
48
-
expected: After setting a non-default range and reopening the companion, the button reads the last-used range (Accent) and currentTimeWindow() returns the restored span — loaded from companionPrefs.
49
-
result: [pending]
56
+
### 9. Theme restyle + persistence across reopen
57
+
expected: Switching theme restyles the dropdown (and open strip); reopening the companion restores the last-used range from companionPrefs.
58
+
result: pending
59
+
note: theme restyle covered by TestCompanionTimeBar; persistence by automated companion tests.
50
60
51
61
## Summary
52
62
53
63
total: 9
54
-
passed: 0
64
+
passed: 6
55
65
issues: 0
56
-
pending: 9
66
+
pending: 3
57
67
skipped: 0
58
-
blocked: 0
59
68
60
69
## Gaps
70
+
71
+
- truth: "Time-range selection is integrated into the companion's top toolbar (no separate window)"
72
+
status: resolved
73
+
reason: "User: the picker opened a separate modal window via the 'Last 7 days' button; wanted it integrated in the top bar, not a new window. Follow-up: also wanted a date picker / edit field for direct date entry."
resolution: "Reworked CompanionTimeBar from a separate uifigure popup to an inline toolbar uidropdown (six presets, apply-on-select) plus a 'Custom…' item that reveals an in-window overlay strip under the toolbar with a Relative (N + unit) tab and an Absolute (Start/End date pickers) tab, Apply/Cancel. The strip parents to the companion figure (derived via ancestor of the dropdown) — no separate window. Fixed a layout bug where the two mode panels stacked and clipped (now overlap in one host cell). TestCompanionTimeBar rewritten for the dropdown + strip (12/12); TestFastSenseCompanion default-label assertion updated from btn.Text to btn.Value (5/5 range subset). User-verified live 2026-06-03."
0 commit comments