wavetermdev / waveterm

An open-source, cross-platform terminal for seamless workflows
https://www.waveterm.dev
Apache License 2.0
3.93k stars 93 forks source link

Date filter slection in history is not working as expected from the label #171

Open YJDoc2 opened 9 months ago

YJDoc2 commented 9 months ago

Describe the bug The history filtering is not working as expected. Say I ran several commands yesterday, then ran clear, closed Wave, shut down machine. I opened Wave today again, and ran some more commands (in same workspace, in same tab). Now when I go the history section, there is a filter named 'From'. I expect that I get list of all commands that I ran from the selected date. However it seems that the commands I get are upto the selected date.

To Reproduce

  1. create a workspace + tab (or use existing)
  2. run some commands, run clear (not sure if clearing plays a part or not, but I did run it), close wave and do something else for rest of the day
  3. the next day run some more commands in the same workspace+tab.
  4. go to history section, and select current day in the calendar selection.
  5. similarly select the previous day in calendar selection, and several days back in the selection

Expected behavior

Desktop (please complete the following information):

Additional context It seems that the 'From' in date selection is actually used as 'Upto' internally? It ok if that is the intention, but the label seems to create confusion.

sawka commented 9 months ago

Thanks for submitting. I understand your point about the label. The history search UI needs to be improved and at that point we'll probably add a real date range picker. My thought when building that control was that since the commands are sorted in reverse time order, the only date filter that makes sense would be to start searching "from" a date in the past.

YJDoc2 commented 9 months ago

Hey, cool, thanks! It took me a bit before I wrapped my head around the way the filter is working, so maybe label / behavior change should be considered whenever the UI is revisited. Should I close this issue, or keep it open?