Commit Graph

27 Commits

Author SHA1 Message Date
hunteraraujo
57bcbdf45c Refactor LeaderboardSubmissionDialog to use SharedPreferencesService 2023-10-10 23:19:35 -07:00
hunteraraujo
51ebe2407d Integrate TaskQueueViewModel throughout application 2023-10-08 22:34:52 -07:00
hunteraraujo
b2d53d8d18 Introduce TestOption Enum for Enhanced Test Selection Clarity (#5586) 2023-10-06 16:13:33 -07:00
hunteraraujo
f97fc0dd3d Add GitHub Repository Validation to Leaderboard Submission Dialog (#5539) 2023-10-04 11:32:45 -07:00
hunteraraujo
45c15fc8c6 Enhanced Test Execution Flexibility (#5521)
Refactor UI and Logic for Task Queue and Test Suite Button
2023-10-03 22:34:22 -07:00
hunteraraujo
da6311fb1e Fix UI Overlap Issue in TaskQueueView
This commit addresses a UI issue where the ListView items were overlapping with the Positioned widget in the TaskQueueView. The Positioned widget has been replaced with a more flexible layout using a Column widget to ensure proper spacing and positioning of elements on the screen. The ListView now takes up all available space above the buttons, preventing any overlap and enhancing the user experience.
2023-10-03 22:05:21 -07:00
hunteraraujo
0847505add Dismiss leaderboard submission pop up after submitting 2023-09-27 15:46:54 -07:00
hunteraraujo
122c996714 Add helpful print statements and fix isURL validation 2023-09-27 15:46:05 -07:00
hunteraraujo
105b80101e Update Leaderboard Submission Dialog to Pass Parameters to ViewModel
This commit updates the Leaderboard Submission Dialog to pass the team name, repository URL, and commit SHA as parameters to the submitToLeaderboard function in the SkillTreeViewModel. These changes ensure that the dialog and the ViewModel are aligned in terms of parameter requirements, facilitating efficient and accurate leaderboard submissions.
2023-09-27 15:33:11 -07:00
hunteraraujo
9c1b55b9fb Integrate UriUtility in LeaderboardSubmissionDialog for URL Validation
This commit integrates the newly created UriUtility class into the LeaderboardSubmissionDialog. The isURL method from UriUtility is used to add an additional layer of validation for the GitHub repository URL input field. It ensures that users enter a valid URL format before submitting their leaderboard entries.

Changes made:
- Integrated UriUtility’s isURL method in the _validateAndSubmit function of the LeaderboardSubmissionDialog.
- Added a specific error message "Invalid URL format" to inform users when the entered URL does not meet the validation criteria.
- Updated the state management to reflect the URL validation status and re-render the dialog with appropriate error messages when necessary.

With this integration, the application now provides real-time feedback on the validity of the entered URL, enhancing user experience and data integrity by ensuring that only valid URLs are submitted to the leaderboard.
2023-09-27 15:11:27 -07:00
hunteraraujo
1b9ec31d84 Add tooltip for LeaderboardSubmissionButton 2023-09-26 16:34:15 -07:00
hunteraraujo
efe1b3e0eb Update TaskQueueView with TestSuiteButton and LeaderboardSubmissionButton
Integrated both the TestSuiteButton and LeaderboardSubmissionButton in the TaskQueueView. Added conditions to disable the LeaderboardSubmissionButton based on benchmark running status and if the benchmarkStatusMap is empty. The onPressed logic for both buttons has been integrated as per requirements.
2023-09-26 16:28:52 -07:00
hunteraraujo
79f96c8f91 Introduce LeaderboardSubmissionButton widget
Added a new LeaderboardSubmissionButton widget to facilitate user submissions to the leaderboard. The button is styled consistently with other application buttons and features an emoji trophy icon to indicate leaderboard submissions. It provides a mechanism for disabling submissions based on certain conditions.
2023-09-26 16:03:27 -07:00
hunteraraujo
2605cd04d4 Add TestSuiteButton
Introduced a new reusable TestSuiteButton widget. It provides flexibility for positioning and is intended for initiating the test suite in the TaskQueueView.
2023-09-26 15:59:56 -07:00
hunteraraujo
6365071bb4 Add LeaderboardSubmissionDialog with SharedPreferences support
Introduce the LeaderboardSubmissionDialog widget which allows users to submit their team name, GitHub repo URL, and commit SHA for leaderboard consideration.

Features:
- Field validation: Ensure that all required fields are filled before submission.
- SharedPreferences integration: Save the user's last submission values and auto-populate the fields with these values when the dialog is shown next time.

This enhancement provides a smoother user experience by reducing repetitive data entry for subsequent leaderboard submissions.
2023-09-26 15:41:51 -07:00
hunteraraujo
ecc8d9430c Enhance Hierarchy Population to Support Nodes with Multiple Parents
This commit refines the `populateSelectedNodeHierarchy` method in the `SkillTreeViewModel` to accurately represent nodes that possess multiple parent nodes, ensuring a comprehensive and non-redundant representation of the entire hierarchy leading back to the root nodes.

Modifications and Features:
- The method now employs recursion to traverse all possible paths back to the root nodes from a selected node, capturing every unique node in the hierarchies.
- A `Set` is utilized to monitor and ensure that each node is only added once to the `_selectedNodeHierarchy` list, eliminating the possibility of duplicates.
- The finalized `_selectedNodeHierarchy` list is constructed such that the root of the tree is the last item in the list, providing a more logical representation of the hierarchy.

These enhancements ensure a more accurate and efficient representation of the skill tree structure, particularly in scenarios where nodes have multiple parents, facilitating better navigation and interaction within the skill tree.
2023-09-22 17:26:47 -07:00
hunteraraujo
377d0af228 Refactor SkillTreeViewModel and Update TaskQueueView UI for Task Status (#5269)
* Refactor SkillTreeViewModel and Update TaskQueueView UI for Task Status

* Notify UI when updating benchmark status
2023-09-19 23:30:22 -07:00
hunteraraujo
525571c32e Enhance runBenchmark with TestSuite Tracking (#5268) 2023-09-19 21:31:02 -07:00
hunteraraujo
5afab461ee Refactor Benchmarking Workflow and Introduce New Data Models (#5264)
* New benchmark data models

* Update _benchmarkBaseUrl

* Remove ReportRequestBody

* Update benchmark service methods for proxy approach

* Add eval id to SkillNodeData

* Refactor runBenchmark Method for proxy approach
2023-09-19 17:01:15 -07:00
hunteraraujo
bf03dd8739 Refactor runBenchmark in SkillTreeViewModel for New Report Generation Flow
This commit updates the runBenchmark method in the SkillTreeViewModel class to align with the new report generation flow. The updated method does the following:

1. Checks if a benchmark is already running to prevent overlapping runs.
2. Sets a flag to indicate that the benchmark is running and notifies the UI.
3. Reverses the selected node hierarchy for report generation.
4. Loops through each node in the reversed hierarchy to:
  - Generate a unique UUID for each test run.
  - Create a ReportRequestBody object.
  - Call the generateSingleReport method in the BenchmarkService.
  - Update the UI after each single report is generated.

5. After all single reports are generated, it calls the generateCombinedReport method in the BenchmarkService, passing in all the generated UUIDs.

6. Finally, it sets the benchmark running flag to false and notifies the UI.

This change improves the report generation flow and allows for both individual and combined reports.
2023-09-18 19:55:01 -07:00
hunteraraujo
60ae12dfd5 Implement UI Disable Feature During Benchmark Run
Added a state variable isBenchmarkRunning in SkillTreeViewModel to track the status of benchmark execution. This state variable is used to conditionally disable specific UI components:

- The "Initiate test suite" button in TaskQueueView is disabled during the benchmark.
- All IconButtons in SideBarView are disabled during the benchmark.
- Node selection in SkillTreeView is disabled during the benchmark.

This ensures that the user cannot interact with these components while a benchmark test is running, thereby improving UX and preventing potential issues.
2023-09-16 19:24:54 -07:00
hunteraraujo
11101286a3 Remove comment 2023-09-16 19:02:45 -07:00
hunteraraujo
6b921b5eda Refactor test suite button + rename method to runBenchmark 2023-09-16 18:56:42 -07:00
hunteraraujo
d48eb99669 Pass Real Data to callGenerateReport in TaskQueueView
This commit updates the `TaskQueueView` to pass real data from the `selectedNodeHierarchy` to the `callGenerateReport` method in `SkillTreeViewModel`. An array of test names is constructed from the reversed node hierarchy, and these names are used as the `tests` field in the `ReportRequestBody`.

Note: The `category` field is now an empty string as per the new requirement, and `mock` continues to be set to true.
2023-09-16 15:14:34 -07:00
hunteraraujo
454b78c1ac Integrate callGenerateReport with TaskQueueView's Checkmark Button
This commit integrates the `callGenerateReport` method from `SkillTreeViewModel` into the `TaskQueueView`. Now, when the user clicks the green checkmark button, the `callGenerateReport` method is triggered with hardcoded values for testing purposes.

Note: The implementation is still temporary and will be updated for dynamic behavior in the future.
2023-09-16 11:04:40 -07:00
hunteraraujo
b58894ef33 Update TaskQueueView to display node label + description 2023-09-13 17:37:03 -07:00
hunteraraujo
314cce75b5 Integrate TaskQueueView and Enhance SkillTree Functionality (#5206)
* Add TestQueueView to Main Layout

This commit integrates the TestQueueView into the main layout. The layout now conditionally displays the TestQueueView based on whether a node in the SkillTree is selected.

- TestQueueView appears when a SkillTree node is selected.
- Main layout adjusts to accommodate TestQueueView alongside SkillTreeView and ChatView.
- Implemented responsive layout logic to manage the widths of the different views based on the screen width and the state of the SkillTree.

* Extend SkillTreeViewModel to Track Selected Node Hierarchy

This commit enhances the SkillTreeViewModel to maintain a list of nodes that form a hierarchy from the currently selected node to the root. This allows for more interactive and informative views that can leverage this hierarchical data.

- Added a new property `selectedNodeHierarchy` to keep track of the node hierarchy.
- Modified the `toggleNodeSelection` method to populate or clear `selectedNodeHierarchy` based on node selection.
- Introduced a new method `populateSelectedNodeHierarchy` to build the hierarchy from the selected node to the root.

* Extract skill tree view model reset state to method

* Implement UI enhancements for TaskQueueView

This commit introduces several UI improvements to the TaskQueueView:
- Tiles are padded 20 units from both the leading and trailing edges.
- Tiles now have a white background.
- Added a thin black border to the tiles.
- Incorporated a slight corner radius for the tiles.
- Centered the title and subtitle horizontally within the tiles.
- Added a checkmark button with a tooltip at the bottom-right corner for running a suite of tests.

These changes aim to improve the user experience and visual appeal of the TaskQueueView.

* Make MainLayout a consumer of SkillTreeViewModel
2023-09-12 14:01:32 -07:00