Skip to content

Bug/date in filters - #183

Merged
DmitryMK merged 3 commits into
devfrom
bug/dateInFilters
Jul 25, 2026
Merged

DmitryMK merged 3 commits into
devfrom
bug/dateInFilters

Conversation

@DmitryMK

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 22, 2026 14:41
@DmitryMK
DmitryMK changed the base branch from main to dev July 22, 2026 14:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts how useCommandAutocomplete determines a column’s type when formatting unique filter values (notably relevant for date/string quoting behavior) in the renderer.

Changes:

  • Updated useCommandAutocomplete to look up columnTypes using a lowercased columnId during loadValues.
Comments suppressed due to low confidence (1)

src/renderer/components/hooks/useCommandAutocomplete/index.ts:130

  • columnTypes is keyed inconsistently across the app (e.g. CommandLine.tsx uses original column names while FilterBody.tsx lowercases keys). Changing this lookup to columnId.toLowerCase() fixes the latter but breaks the former: when columnTypes uses original-case keys, columnType becomes undefined, causing formatFilterValueOption(...) to omit quotes for string/date values. It also leaves the later comparableVariables type comparison using the old casing logic, so results are still inconsistent.

Consider resolving column types via a small helper that tries both the exact key and a normalized key (and defaults to 'string'), and reuse it for comparableVariables.

                const columnType = columnTypes[columnId.toLowerCase()];
                const formattedValues = (values[columnId]?.values ?? []).map(
                    (value) =>
                        formatFilterValueOption(
                            value,

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Comment thread src/renderer/utils/getColumnTypes.ts
@DmitryMK
DmitryMK merged commit a060b8b into dev Jul 25, 2026
1 check passed
@DmitryMK
DmitryMK deleted the bug/dateInFilters branch July 25, 2026 16:07
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