Skip to content

Conversation

@Mirrorgo
Copy link
Collaborator

@Mirrorgo Mirrorgo commented Nov 5, 2024

No description provided.

Mirrorgo and others added 30 commits October 12, 2024 13:35
…ard-page

feat: add highlight circle for the selected candidate and integrate i…
# Conflicts:
#	app/dashboard/components/elimination-tree/index.tsx
…dd difficulty/margin for sample file ( not these number is not real)
fix: search records still exist when the text was cleared in search bar; change arrow icons; change the style of fold and unfold button for toc;
chore: delete floatingmenu(useless now)
chore: update versions of @radix-ui/react-checkbox and @radix-ui/reac…
ylimezhang and others added 21 commits June 2, 2025 19:31
# Conflicts:
#	app/sample/components/sample-selector.tsx
chore: delete unused code in prettyprint_assertions_and_pictures and …
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This release adds a comprehensive dashboard UI for RAIRE assertion explanations and multi-winner elimination visualizations, along with supporting utilities, tour integration, and documentation updates.

  • Introduces DescribeRaireResult component to render solver outcomes and user-friendly error messages.
  • Implements Dashboard page with assertion table, elimination tree (default and step-by-step), modals, and tour controls.
  • Adds deep-clone utility, one-click animation for elimination steps, tour watchers/providers, and updates README.

Reviewed Changes

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

Show a summary per file
File Description
app/explain-assertions/components/describe-raire-result.tsx New component to display RAIRE results and errors
app/dashboard/page.tsx Main dashboard layout integrating cards, tables, and tree
app/dashboard/components/step-by-step-view/utils.ts Helper deepCloneTree for tree data cloning
app/dashboard/components/step-by-step-view/one-click-animation.tsx One-click animation component for elimination process
app/dashboard/components/step-by-step-view/index.tsx Wrapper for step-by-step elimination view
app/dashboard/components/elimination-tree/step-by-step.tsx Visual indicator component for step navigation
app/dashboard/components/elimination-tree/search-dropdown.tsx Searchable dropdown for candidate selection
app/dashboard/components/elimination-tree/index.tsx Tabs and locking logic for default vs step-by-step tree
app/dashboard/components/elimination-tree/default-candidate-list-bar.tsx Avatar list and search for default tree view
app/dashboard/components/elimination-tree/constants.ts Defines Candidate type
app/dashboard/components/elimination-tree/candidate-list-bar.tsx Avatar list for step-by-step tree view
app/dashboard/components/card.tsx Reusable Card UI component
app/dashboard/components/audit-progress-animation.tsx Animation showing audit progress
app/dashboard/components/assertions-details-modal.tsx Modal showing paginated assertion details
app/dashboard/components/assertion-table.tsx Table with assertion list and inline audit animation
app/dashboard/components/Information-icon-text.tsx Tooltip-with-icon component for “Need Help?” links
app/TourSyncWatcher.tsx Syncs tour steps to candidate count
app/TourStepWatcher.tsx Triggers side effects on specific tour steps
app/ClientTourProvider.tsx Wraps app in Reactour TourProvider and watchers
README.md Updated project documentation and technology list
Comments suppressed due to low confidence (3)

app/explain-assertions/components/describe-raire-result.tsx:48

  • [nitpick] The message 'Output is wrong format' is grammatically unclear. Consider revising to something like 'Unexpected output format' to guide users more effectively.
<p className="error">Output is wrong format</p>

app/dashboard/page.tsx:33

  • Variable judge_select_new_tree uses snake_case, but the codebase uses camelCase. Rename to judgeSelectNewTree for consistency.
const judge_select_new_tree = candidateCount >= 6;

README.md:8

  • The team member table header separator line has no column titles. Restore the header row to match markdown table syntax, e.g., | Name | Roles | followed by | --- | --- |.
| ----------- | ----------------------------------- |

} else if (err === "TimeoutCheckingWinner") {
errorMessage =
"Timeout checking winner - either your problem is exceptionally difficult, or your timeout is exceedingly small.";
} else if (err.hasOwnProperty("TimeoutFindingAssertions")) {
Copy link

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

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

Checking err.hasOwnProperty assumes err is an object, but earlier branches treat it as a string. Add a type guard before calling hasOwnProperty to avoid runtime errors.

Suggested change
} else if (err.hasOwnProperty("TimeoutFindingAssertions")) {
} else if (typeof err === "object" && err !== null && err.hasOwnProperty("TimeoutFindingAssertions")) {

Copilot uses AI. Check for mistakes.
type CandidateListBarProps = {
selectedWinnerId: number | null; // ID of the currently selected winner
handleSelectWinner: (id: number) => void; // Callback function to handle winner selection
useAvatar: boolean; // Flag to determine if avatars should be used (currently unused in component)
Copy link

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

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

The useAvatar prop is declared but never used. Consider removing it or implementing its logic to avoid confusion.

Suggested change
useAvatar: boolean; // Flag to determine if avatars should be used (currently unused in component)

Copilot uses AI. Check for mistakes.
// Helper function to deep clone tree data
function deepCloneTree(tree: TreeNode | undefined | null): TreeNode | null {
if (!tree) return null;
return JSON.parse(JSON.stringify(tree));
Copy link

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

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

Using JSON.parse(JSON.stringify(...)) for deep cloning can fail on dates, functions, and special object types. Consider using a utility like structuredClone or a library for robust deep cloning.

Suggested change
return JSON.parse(JSON.stringify(tree));
return structuredClone(tree);

Copilot uses AI. Check for mistakes.
@lvyl9909 lvyl9909 merged commit 0e26a71 into main Jun 4, 2025
1 check passed
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.