Commit Graph

72 Commits

Author SHA1 Message Date
SwiftyOS
e71943f83b change the index url for the tutorials 2023-09-29 13:50:18 +02:00
SwiftyOS
2640fc85cf Frontend - Added link to tutorials 2023-09-29 13:36:58 +02:00
hunteraraujo
cbdb6ac0bf Add _throwawayFocusNode to allow continuous mode to work after dialog 2023-09-29 00:22:00 -07:00
hunteraraujo
8c58df706a Show helpful toast if someone hits a 404 2023-09-28 23:43:02 -07:00
hunteraraujo
ab2a49c8d2 Show loading state when running benchmark or waiting for agent response 2023-09-28 13:09:26 -07:00
hunteraraujo
a438619177 Add LoadingIndicator for Async Operations
Implemented a new LoadingIndicator widget that displays a pulsating gradient line, giving users visual feedback during asynchronous operations such as API calls. The indicator animates a gradient from white to AppColors.primaryLight and back to the grey background color, signifying the loading state.
2023-09-28 12:54:13 -07:00
hunteraraujo
41f0b472c0 Remove dark mode toggle until implementation is completed 2023-09-28 00:00:07 -07:00
hunteraraujo
d2f64a1163 Fix bug where AgentMessageTile are being reused inappropriately 2023-09-27 23:01:06 -07:00
hunteraraujo
b04f4e0f55 Added Artifact Handling for Chat Messages
- Enhanced the `Chat` model to include an `artifacts` field to hold associated artifacts.
- Updated the `AgentMessageTile` widget to display the number of artifacts and added functionality to trigger artifact downloads upon button press.
- Introduced a method in `ChatViewModel` to leverage the `ChatService` for artifact downloads.
2023-09-27 22:37:06 -07:00
hunteraraujo
c739e049c3 Fixed bug where task list did not update when creating new task 2023-09-27 20:27: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
5df70eabd8 Adjust spacing + sizes of social icons 2023-09-26 20:18:29 -07:00
hunteraraujo
2d64647543 Update SideBarView with socials 2023-09-26 19:58:30 -07:00
hunteraraujo
193278fb53 Add image assets 2023-09-26 19:48:21 -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
389131f2ab Add ContinuousModeDialog and integrate with ChatInputField
- Introduced a new dialog, ContinuousModeDialog, to inform users about the repercussions of the continuous mode.
- Integrated ContinuousModeDialog with ChatInputField. The dialog is shown when the fast-forward icon is clicked, based on the user's shared preferences.
- Leveraged shared preferences to remember if the user has chosen not to see the dialog again.
- Enhanced the ChatInputField to handle different states and user interactions related to continuous mode.
2023-09-26 14:25:20 -07:00
hunteraraujo
3d4307a848 Added SkillTreeType enum and implemented dropdown selection in SkillTreeView
- Introduced a new `SkillTreeType` enum to represent different skill tree categories: General, Coding, Data, and Scrape/Synthesize.
- Extended the `SkillTreeType` enum to provide associated string values and JSON file names for each category.
- Refactored the `SkillTreeViewModel` to reload the skill tree data based on the selected category.
- Enhanced `SkillTreeView` by adding a positioned dropdown in the top-left corner to allow users to select and load different skill tree categories dynamically.
2023-09-25 23:08:24 -07:00
hunteraraujo
77ae0f490d Update hintText 2023-09-24 22:11:57 -07:00
hunteraraujo
72cbfd4d96 Conditionally show skill tree toggle based off isDeveloperModeEnabled 2023-09-24 22:09:45 -07:00
hunteraraujo
41a4ff828c Clean up settings view 2023-09-24 22:01:50 -07:00
hunteraraujo
da8b9d58ac Refactor Settings and Task Views for API Base URL Management
- Deprecated `ApiSettingsViewModel` in favor of enhancing `SettingsViewModel`.
- Moved the API Base URL field from `TaskView` to `SettingsView` to centralize configuration.
- Integrated `RestApiUtility` dependency into `SettingsViewModel` to ensure consistent URL management across the app.
2023-09-24 21:41:12 -07:00
hunteraraujo
ffa76c3a19 Integrated continuousModeSteps from SettingsViewModel into ChatViewModel
Refactored the ChatViewModel's sendChatMessage method to utilize the continuousModeSteps setting from the SettingsViewModel. This allows the continuous chat mode to honor the user's preference from the settings. Also introduced an optional currentStep parameter with a default value, enabling better control over the progression of continuous mode.
2023-09-24 17:15:36 -07:00
hunteraraujo
9463fbbe2b Refactor SettingsView to Accept External ViewModel
Changed the architecture of the SettingsView to align with the existing pattern in the application. Instead of creating its own instance of SettingsViewModel, the view now accepts an external viewModel as a parameter. This ensures consistency across the application and allows for better modularity and reusability of components.
2023-09-24 13:31:47 -07:00
hunteraraujo
9bd06cefdd Change color of settings app bar 2023-09-24 12:13:05 -07:00
hunteraraujo
a09d2a581f Enhance SettingsViewModel with State Persistence and Sign Out
This commit enriches the `SettingsViewModel` by integrating state persistence functionality and a sign-out method, thus ensuring a more robust and user-friendly settings feature.

Key Enhancements:
1. **State Persistence**:
   - Leveraging the `shared_preferences` package, the app now stores and retrieves user preferences related to app settings, ensuring consistency across app restarts.
   - Preferences like Dark Mode, Developer Mode, Base URL, and Continuous Mode Steps are persistently stored and loaded when the ViewModel is initialized.

2. **Sign Out Method**:
   - A `signOut` method has been introduced in the ViewModel, utilizing the `AuthService` to facilitate user sign-out processes.
   - This addition allows for seamless integration of sign-out functionality within the settings interface, granting users the ability to easily terminate sessions.

3. **SettingsView Enhancement**:
   - The `SettingsView` has been adapted to incorporate a UI element invoking the `signOut` method, enhancing user interaction within the settings environment.

This enhancement not only bolsters the resilience and usability of the app’s settings but also lays down a structured approach for potential future additions to user preferences and settings-related functionalities.
2023-09-23 21:51:07 -07:00
hunteraraujo
4c0349a6a8 Integrate SettingsView into MainLayout
This commit integrates the newly created `SettingsView` into the `MainLayout`, allowing users to access and interact with the settings through the main user interface of the app. When the user selects the settings tab from the `SideBarView`, the `SettingsView` is displayed alongside the `ChatView`, maintaining consistent layout aesthetics with other views like `TaskView`.

Key Changes:
- A new condition has been added in the `ValueListenableBuilder` within the `MainLayout` to check if the selected view is `'SettingsView'`.
- When `'SettingsView'` is selected, `SettingsView` is rendered with the same width as `TaskView`, and `ChatView` is displayed next to it.
- The state of the skill tree is reset when navigating to `SettingsView` to ensure a clean state.

This integration ensures a seamless user experience, allowing users to navigate and configure app settings easily and efficiently from the main layout of the app.
2023-09-22 23:36:12 -07:00
hunteraraujo
9d1b235472 Add Settings Tab to SideBarView
This commit augments the `SideBarView` by introducing a new `IconButton` that represents a tab for the newly created `SettingsView`. This enhancement allows users to navigate to the settings page directly from the sidebar, improving accessibility to app configuration options.

Key Changes:
- A new `IconButton` with a settings icon has been added to the sidebar’s `Column` widget.
- Selecting the settings tab updates the `selectedViewNotifier.value` to `'SettingsView'`, indicating the user's intent to navigate to the settings page.
- Visual feedback is provided by altering the color of the settings icon based on whether the settings tab is currently selected.

This addition ensures seamless integration of the `SettingsView` into the existing navigation structure, enabling users to easily configure app settings.
2023-09-22 23:24:37 -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
45819e68d0 Use SugiyamaAlgorithm instead of BuchheimWalkerAlgorithm for skill tree 2023-09-22 16:20:04 -07:00
hunteraraujo
bb627442d4 Implement SettingsView for User Configurable Settings
This commit introduces the `SettingsView` class, which is responsible for rendering the user interface for the settings feature of the app. This View is associated with the `SettingsViewModel` for state management and logic.

Features Represented in this View:
- Dark Mode: A switch to enable or disable Dark Mode.
- Developer Mode: A switch to enable or disable Developer Mode.
- Base URL: A text field to input and configure the Base URL.
- Continuous Mode Steps: User-friendly '+' and '-' buttons allowing users to configure the number of steps for continuous mode.

The `SettingsView` utilizes the Flutter `ListView` to display various settings options, providing an intuitive and user-friendly experience. It employs reactive state management using the `Provider` package, ensuring that any state changes in the associated ViewModel are reflected immediately in the View. Proper documentation and comments have been added for better code readability and maintenance.
2023-09-22 14:41:41 -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
8923e79b29 Refactor TaskView to Support Combined Data and Test Suite Detail View
This commit introduces substantial improvements to the TaskView class to accommodate both tasks and test suites in a unified view. It also integrates the TestSuiteDetailView to display test suite details when a test suite is selected.

Key Enhancements:

1. Modified the `initState` method to call `fetchAndCombineData()` from TaskViewModel, thereby populating the combined data source.
2. Replaced the ListView that was rendering tasks with a ListView that can render both tasks and test suites.
3. Introduced conditional rendering for TestSuiteDetailView when a test suite is selected.
4. Updated onTap actions to select and deselect tasks and test suites appropriately.
5. Moved to using a Stack layout to allow overlay of TestSuiteDetailView on top of the existing layout.

This refactor enhances the TaskView's capabilities to manage and display both tasks and test suites, offering a more integrated user experience.
2023-09-18 15:08:22 -07:00
hunteraraujo
9f92488443 Add TestSuiteDetailView for Detailed Test Suite Management
This commit introduces a new StatefulWidget, TestSuiteDetailView, to offer a dedicated view for managing and interacting with individual Test Suites.

Key Features:
- Created a TestSuiteDetailView class that takes a TestSuite object and a TaskViewModel as parameters.
- Added an AppBar with a back button for easy navigation.
- Utilized ListView.builder to display a list of tasks that belong to the selected Test Suite.
- Integrated with existing TaskViewModel to select and delete tasks within the Test Suite.
- Included a Provider for the ChatViewModel to update the current task ID when a task is selected.

This new view enhances the user experience by providing a focused interface for managing tasks within individual Test Suites. This facilitates better organization and navigation for the user.
2023-09-18 14:59:26 -07:00
hunteraraujo
3cbe5a84e4 Implement TestSuiteListTile Widget for Displaying Test Suites
This commit adds a new StatelessWidget, TestSuiteListTile, designed to display individual TestSuite items in a list.

Key Features:
- Created a TestSuiteListTile class that takes a TestSuite object and a VoidCallback for the onTap event as parameters.
- Utilized Material Design with custom styling to ensure the tile fits well within the application's UI.
- The tile displays the timestamp of the TestSuite, which serves as its title.
- Included a play arrow icon to indicate that the tile is actionable.
- Utilized MediaQuery to adapt the tile width based on the screen size, capped at a maximum width of 260.

By adding this widget, we improve the UX by providing a consistent and intuitive way to interact with TestSuite objects in the UI.
2023-09-18 14:55:03 -07:00
Swifty
8b3a915b2f Serving frontend from the forge agent server (#5252) 2023-09-18 16:27:03 +02:00
hunteraraujo
4463f75756 Fix issue where side bar view is not disabled 2023-09-16 22:19:42 -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