Skip to content

Conversation

@jaykim1213
Copy link
Contributor

@jaykim1213 jaykim1213 commented Nov 13, 2025

Does this PR close any open issues?

Closes #246
Closes #416

Give a longer description of what this PR addresses and why it's needed

  • Download all/single configurations
  • Filter configurations
  • View all configurations and see how they differ

Provide pictures/videos of the behavior before and after these changes (optional)

Live link: https://revisit.dev/study/PR964/analysis/stats/demo-html/config

Config Tab
image

Config Filter
image

Compare Configs
image

Are there any additional TODOs before this PR is ready to go?

TODOs:

  • Update relevant documentation
  • Add copy button (Participant ID in Table View, Config Hash in Config)
  • Test smaller screen size
  • Test N/A time frame

Discussion

  • Test white space changes in Compare Config

Config comparison cannot detect whitespace differences right now.

In storage/engines/types.ts saveConfig, we hash the config:

const configHash = await hash(JSON.stringify(config));

We use JSON.stringify, so the config is reformatted (2 space indentation), and the original whitespace and formatting are lost.

To add detecting whitespace-only changes, we would need to store the raw config text or we can mention this limitation in the docs?

@github-actions
Copy link

github-actions bot commented Nov 13, 2025

A preview of de25464 is uploaded and can be seen here:

https://revisit.dev/study/PR964

Changes may take a few minutes to propagate.

@jaykim1213 jaykim1213 added this to the v2.4 milestone Dec 18, 2025
@jaykim1213 jaykim1213 marked this pull request as ready for review January 5, 2026 15:59
Copy link
Contributor

@JackWilb JackWilb left a comment

Choose a reason for hiding this comment

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

Pending a few things

  • Styling changes
  • Copy buttons on the hashes and participant IDs
  • NA in time column
  • Test whitespace

Comment on lines 109 to 120
Cell: ({ row }: { row: { original: ConfigInfo } }) => (
<Flex align="center" gap="xs">
<Text>
{row.original.hash.slice(0, 6)}
...
</Text>
<Tooltip label={row.original.hash}>
<IconInfoCircle size={16} />
</Tooltip>
</Flex>
),
},
Copy link
Contributor

Choose a reason for hiding this comment

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

This also needs a button to copy the value. Can you also please add this copy button to the Participant View ID column?

Copy link
Contributor Author

@jaykim1213 jaykim1213 Jan 9, 2026

Choose a reason for hiding this comment

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

Added copy button in ConfigView and TableView

Comment on lines +126 to +130
{
accessorKey: 'timeFrame',
header: 'Time Frame',
size: 150,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are some values in this column NA? Can we do anything better? Maybe start time, not end time, or upload time from the DB?

Copy link
Contributor Author

@jaykim1213 jaykim1213 Jan 9, 2026

Choose a reason for hiding this comment

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

If no start time or end time is provided, it will use createdTime from the database, which tracks when the participant registered (when they started the study)

  /** Time that the participant registered for the study in epoch milliseconds. */
  createdTime?: number;

});
}

export function generateDiffView(configs: ConfigInfo[]): JSX.Element | null {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be in its own component file, not in the utils here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved to ConfigDiffViewModal.tsx

@@ -0,0 +1,255 @@
/* eslint-disable react/no-unstable-nested-components */
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this required because of the table? Is it simple to remove this?

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.

Add filter data by version (config meta data) in the analytics platform Allow downloading all configs from the database

3 participants