Skip to content

Avoid encoding query parts unnecessarily - #873

Draft
SeanDuHare wants to merge 3 commits into
mainfrom
bugfix/avoid-file-buffer-drop
Draft

Avoid encoding query parts unnecessarily#873
SeanDuHare wants to merge 3 commits into
mainfrom
bugfix/avoid-file-buffer-drop

Conversation

@SeanDuHare

Copy link
Copy Markdown
Contributor

Context

Supplying a local provenance file isn't working right now. This is because the path the file takes to make it into the processProvenance logic requires getting encoded and decoded. However, since file buffers can't be encoded into query arguments it gets dropped and then we end up with this error:

Screenshot 2026-07-13 at 10 22 18 AM

Changes

This removes the unnecessary encode/decode step and has changeQuery directly dispatch the actions.

Testing

Tried supplying a local and cloud provenance file. Works first time, able to re-enter provenance which works as well.

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 removes the intermediate SearchParams encode/decode flow when switching queries, so query changes dispatch state-updating actions directly (avoiding loss of non-URL-serializable values like local provenance File objects).

Changes:

  • Removed the DECODE_FILE_EXPLORER_URL / decodeSearchParams action and its redux-logic handler.
  • Updated changeQueryLogic to apply a selected query’s parts by dispatching the underlying state actions directly.
  • Updated selection logic tests to cover the new changeQueryLogic behavior and removed the old decode-search-params test.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
packages/core/state/selection/test/logics.test.ts Removes decodeSearchParams test coverage and adds new tests for direct changeQueryLogic behavior.
packages/core/state/selection/logics.ts Removes decode-search-params logic and rewires changeQueryLogic to dispatch state actions directly.
packages/core/state/selection/actions.ts Removes the now-unused decode URL action/constant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

parts.fileView && dispatch(setFileView(parts.fileView) as AnyAction);
dispatch(setOpenFileFolders(parts.openFolders));
dispatch(setSortColumn(parts.sortColumn));
dispatch(toggleNullValueGroups(parts.showNoValueGroups) as AnyAction);
dispatch(setQueries(updatedQueries));
dispatch(changeDataSources(parts.sources));
dispatch(setAnnotationHierarchy(parts.hierarchy));
parts.columns && dispatch(setColumns(parts.columns));
dispatch(setAnnotationHierarchy(parts.hierarchy));
parts.columns && dispatch(setColumns(parts.columns));
dispatch(setFileFilters(parts.filters));
parts.fileView && dispatch(setFileView(parts.fileView) as AnyAction);
@SeanDuHare SeanDuHare closed this Jul 13, 2026
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