[PR #25] [MERGED] Improvements to navigation, provider display, and flow process management #126

Closed
opened 2026-06-06 22:09:18 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/vxcontrol/pentagi/pull/25
Author: @asdek
Created: 3/28/2025
Status: Merged
Merged: 3/28/2025
Merged by: @asdek

Base: masterHead: 24-no-operation-provided


📝 Commits (4)

  • 49a1e04 fix: enhance login redirection and provider selection logic
  • ef5c0e5 feat: add new icons and enhance breadcrumb functionality
  • 7ac2eb4 feat: implement Finish method for task and subtask workers
  • 19fe27f refactor: update breadcrumb component for improved status display

📊 Changes

22 files changed (+530 additions, -95 deletions)

View changed files

📝 backend/pkg/controller/flow.go (+8 -0)
📝 backend/pkg/controller/flows.go (+5 -0)
📝 backend/pkg/controller/subtask.go (+17 -0)
📝 backend/pkg/controller/subtasks.go (+5 -0)
📝 backend/pkg/controller/task.go (+21 -0)
📝 backend/pkg/controller/tasks.go (+5 -0)
📝 backend/pkg/database/subtasks.sql.go (+2 -2)
📝 backend/pkg/providers/helpers.go (+5 -0)
📝 backend/sqlc/models/subtasks.sql (+2 -2)
📝 frontend/src/App.tsx (+15 -3)
📝 frontend/src/components/ProtectedRoute.tsx (+8 -2)
📝 frontend/src/components/PublicRoute.tsx (+1 -1)
frontend/src/components/icons/Anthropic.tsx (+24 -0)
frontend/src/components/icons/Custom.tsx (+24 -0)
frontend/src/components/icons/OpenAi.tsx (+24 -0)
📝 frontend/src/components/ui/breadcrumb.tsx (+105 -0)
📝 frontend/src/components/ui/sidebar.tsx (+28 -1)
📝 frontend/src/features/authentication/LoginForm.tsx (+7 -5)
📝 frontend/src/features/chat/ChatSidebar.tsx (+116 -55)
📝 frontend/src/lib/axios.ts (+8 -0)

...and 2 more files

📄 Description

Description of the Change

Problem

The application suffers from several UX and stability issues:

  1. Provider selection not working correctly on first login (no default provider selected)
  2. Navigation issues after login (not returning to the previously accessed page)
  3. Missing visual indicators for flow statuses and provider types in the UI
  4. Inconsistent flow and task termination in the backend causing zombie processes
  5. Inefficient listing of flows, tasks, and subtasks without consistent ordering
  6. Sidebar component issues with menu indicators and icon behavior

Solution

  1. Improved login and navigation experience:

    • Added logic to save and restore the previous URL when redirecting to login
    • Changed default navigation paths to "/chat/new" for better user experience
    • Updated navigation handling across the application
  2. Enhanced UI components:

    • Added provider icons (Anthropic, Custom) for better visual identification
    • Fixed issues with the sidebar menu indicator for running flows
    • Fixed visibility behavior of the MoreHorizontal icon in dropdown menus
  3. Improved backend flow management:

    • Added proper task and subtask finishing logic when a flow is terminated
    • Updated SQL queries to properly handle 'waiting' status for subtasks
    • Fixed message chain result handling in providers
    • Added consistent sorting for flows, tasks, and subtasks by ID

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔧 Configuration change
  • 🧪 Test update
  • 🛡️ Security update

Areas Affected

  • Core Services (Frontend UI/Backend API)
  • AI Agents (Researcher/Developer/Executor)
  • Security Tools Integration
  • Memory System (Vector Store/Knowledge Base)
  • Monitoring Stack (Grafana/OpenTelemetry)
  • Analytics Platform (Langfuse)
  • External Integrations (LLM/Search APIs)
  • Documentation
  • Infrastructure/DevOps

Testing and Verification

Test Configuration

PentAGI Version: latest
Docker Version: 28.0.1
Host OS: macOS 15.3.2
LLM Provider: OpenAI, Anthropic, Custom
Enabled Features: [Langfuse, OpenTelemetry]

Test Steps

  1. Log out and then attempt to access a specific chat page
  2. Verify redirect to login followed by return to original URL after successful login
  3. Create new flows with different providers to verify provider icon display
  4. Start multiple flows and verify correct status indicators in the sidebar
  5. Cancel running flows and verify proper cleanup of tasks and subtasks
  6. Test interaction with sidebar menu, verifying correct icon behavior when opening/closing menus
  7. Verify Langfuse and OpenTelemetry integration with monitoring dashboards

Test Results

The application now functions correctly:

  • First-time login automatically selects the first available provider
  • Users are redirected to their intended destination after login
  • Provider icons display correctly in the UI
  • Flow status indicators function properly in the sidebar
  • Canceled flows properly terminate all associated tasks and subtasks
  • Sidebar menu interaction is consistent without visual glitches
  • Monitoring shows proper telemetry data

Security Considerations

No significant security implications. The changes focus on UI improvements, navigation logic, and backend process management without introducing new security concerns.

Performance Impact

These changes improve performance in several ways:

  • Better flow termination prevents orphaned processes in the backend
  • Consistent sorting of flows, tasks, and subtasks improves predictability
  • Fixed handling of message chain results prevents potential memory issues
  • More efficient navigation reduces unnecessary page reloads

Documentation Updates

  • README.md updates
  • API documentation updates
  • Configuration documentation updates
  • GraphQL schema updates
  • Other: Code comments explaining navigation logic and provider icons

Deployment Notes

Checklist

Code Quality

  • My code follows the project's coding standards
  • I have added/updated necessary documentation
  • I have added tests to cover my changes
  • All new and existing tests pass
  • I have run go fmt and go vet (for Go code)
  • I have run npm run lint (for TypeScript/JavaScript code)

Security

  • I have considered security implications
  • Changes maintain or improve the security model
  • Sensitive information has been properly handled

Compatibility

  • Changes are backward compatible
  • Breaking changes are clearly marked and documented
  • Dependencies are properly updated

Documentation

  • Documentation is clear and complete
  • Comments are added for non-obvious code
  • API changes are documented

Additional Notes

The provider icons and flow status indicators are important visual improvements that make the application more intuitive to use. The navigation enhancements significantly improve the user experience, especially for users who are redirected to login from specific pages.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/vxcontrol/pentagi/pull/25 **Author:** [@asdek](https://github.com/asdek) **Created:** 3/28/2025 **Status:** ✅ Merged **Merged:** 3/28/2025 **Merged by:** [@asdek](https://github.com/asdek) **Base:** `master` ← **Head:** `24-no-operation-provided` --- ### 📝 Commits (4) - [`49a1e04`](https://github.com/vxcontrol/pentagi/commit/49a1e048cfe4232a0971a61a5d727503c61d1b6d) fix: enhance login redirection and provider selection logic - [`ef5c0e5`](https://github.com/vxcontrol/pentagi/commit/ef5c0e593956b9a7c8c43122bf0ad96bbe130f83) feat: add new icons and enhance breadcrumb functionality - [`7ac2eb4`](https://github.com/vxcontrol/pentagi/commit/7ac2eb46cb3cfa07dc26cdd9b9bbfa1572073345) feat: implement Finish method for task and subtask workers - [`19fe27f`](https://github.com/vxcontrol/pentagi/commit/19fe27f84c027f775d5a971a537a9ed646824101) refactor: update breadcrumb component for improved status display ### 📊 Changes **22 files changed** (+530 additions, -95 deletions) <details> <summary>View changed files</summary> 📝 `backend/pkg/controller/flow.go` (+8 -0) 📝 `backend/pkg/controller/flows.go` (+5 -0) 📝 `backend/pkg/controller/subtask.go` (+17 -0) 📝 `backend/pkg/controller/subtasks.go` (+5 -0) 📝 `backend/pkg/controller/task.go` (+21 -0) 📝 `backend/pkg/controller/tasks.go` (+5 -0) 📝 `backend/pkg/database/subtasks.sql.go` (+2 -2) 📝 `backend/pkg/providers/helpers.go` (+5 -0) 📝 `backend/sqlc/models/subtasks.sql` (+2 -2) 📝 `frontend/src/App.tsx` (+15 -3) 📝 `frontend/src/components/ProtectedRoute.tsx` (+8 -2) 📝 `frontend/src/components/PublicRoute.tsx` (+1 -1) ➕ `frontend/src/components/icons/Anthropic.tsx` (+24 -0) ➕ `frontend/src/components/icons/Custom.tsx` (+24 -0) ➕ `frontend/src/components/icons/OpenAi.tsx` (+24 -0) 📝 `frontend/src/components/ui/breadcrumb.tsx` (+105 -0) 📝 `frontend/src/components/ui/sidebar.tsx` (+28 -1) 📝 `frontend/src/features/authentication/LoginForm.tsx` (+7 -5) 📝 `frontend/src/features/chat/ChatSidebar.tsx` (+116 -55) 📝 `frontend/src/lib/axios.ts` (+8 -0) _...and 2 more files_ </details> ### 📄 Description <!-- Thank you for your contribution to PentAGI! Please fill out this template completely to help us review your changes effectively. Any PR that does not include enough information may be closed at maintainers' discretion. --> ### Description of the Change <!-- We must be able to understand the design of your change from this description. Please provide as much detail as possible. --> #### Problem <!-- Describe the problem this PR addresses --> The application suffers from several UX and stability issues: 1. Provider selection not working correctly on first login (no default provider selected) 2. Navigation issues after login (not returning to the previously accessed page) 3. Missing visual indicators for flow statuses and provider types in the UI 4. Inconsistent flow and task termination in the backend causing zombie processes 5. Inefficient listing of flows, tasks, and subtasks without consistent ordering 6. Sidebar component issues with menu indicators and icon behavior #### Solution <!-- Describe your solution and its key aspects --> 1. Improved login and navigation experience: - Added logic to save and restore the previous URL when redirecting to login - Changed default navigation paths to "/chat/new" for better user experience - Updated navigation handling across the application 2. Enhanced UI components: - Added provider icons (Anthropic, Custom) for better visual identification - Fixed issues with the sidebar menu indicator for running flows - Fixed visibility behavior of the MoreHorizontal icon in dropdown menus 3. Improved backend flow management: - Added proper task and subtask finishing logic when a flow is terminated - Updated SQL queries to properly handle 'waiting' status for subtasks - Fixed message chain result handling in providers - Added consistent sorting for flows, tasks, and subtasks by ID ### Type of Change <!-- Mark with an `x` all options that apply --> - [x] 🐛 Bug fix (non-breaking change which fixes an issue) - [x] 🚀 New feature (non-breaking change which adds functionality) - [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 📚 Documentation update - [x] 🔧 Configuration change - [ ] 🧪 Test update - [ ] 🛡️ Security update ### Areas Affected <!-- Mark with an `x` all components that are affected --> - [x] Core Services (Frontend UI/Backend API) - [ ] AI Agents (Researcher/Developer/Executor) - [ ] Security Tools Integration - [ ] Memory System (Vector Store/Knowledge Base) - [x] Monitoring Stack (Grafana/OpenTelemetry) - [x] Analytics Platform (Langfuse) - [ ] External Integrations (LLM/Search APIs) - [ ] Documentation - [ ] Infrastructure/DevOps ### Testing and Verification <!-- Please describe the tests that you ran to verify your changes and provide instructions so we can reproduce. --> #### Test Configuration ```yaml PentAGI Version: latest Docker Version: 28.0.1 Host OS: macOS 15.3.2 LLM Provider: OpenAI, Anthropic, Custom Enabled Features: [Langfuse, OpenTelemetry] ``` #### Test Steps 1. Log out and then attempt to access a specific chat page 2. Verify redirect to login followed by return to original URL after successful login 3. Create new flows with different providers to verify provider icon display 4. Start multiple flows and verify correct status indicators in the sidebar 5. Cancel running flows and verify proper cleanup of tasks and subtasks 6. Test interaction with sidebar menu, verifying correct icon behavior when opening/closing menus 7. Verify Langfuse and OpenTelemetry integration with monitoring dashboards #### Test Results The application now functions correctly: - First-time login automatically selects the first available provider - Users are redirected to their intended destination after login - Provider icons display correctly in the UI - Flow status indicators function properly in the sidebar - Canceled flows properly terminate all associated tasks and subtasks - Sidebar menu interaction is consistent without visual glitches - Monitoring shows proper telemetry data ### Security Considerations <!-- Describe any security implications of your changes. For security-related changes, please note any new dependencies, changed permissions, etc. --> No significant security implications. The changes focus on UI improvements, navigation logic, and backend process management without introducing new security concerns. ### Performance Impact <!-- Describe any performance implications and testing done to verify acceptable performance. Especially important for changes affecting AI agents, memory systems, or data processing. --> These changes improve performance in several ways: - Better flow termination prevents orphaned processes in the backend - Consistent sorting of flows, tasks, and subtasks improves predictability - Fixed handling of message chain results prevents potential memory issues - More efficient navigation reduces unnecessary page reloads ### Documentation Updates <!-- Note any documentation changes required by this PR --> - [ ] README.md updates - [ ] API documentation updates - [ ] Configuration documentation updates - [ ] GraphQL schema updates - [x] Other: Code comments explaining navigation logic and provider icons ### Deployment Notes <!-- Describe any special considerations for deploying this change. Include any new environment variables, configuration changes, or migration steps. --> ### Checklist <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> #### Code Quality - [x] My code follows the project's coding standards - [x] I have added/updated necessary documentation - [x] I have added tests to cover my changes - [x] All new and existing tests pass - [x] I have run `go fmt` and `go vet` (for Go code) - [x] I have run `npm run lint` (for TypeScript/JavaScript code) #### Security - [x] I have considered security implications - [x] Changes maintain or improve the security model - [x] Sensitive information has been properly handled #### Compatibility - [x] Changes are backward compatible - [ ] Breaking changes are clearly marked and documented - [x] Dependencies are properly updated #### Documentation - [x] Documentation is clear and complete - [x] Comments are added for non-obvious code - [x] API changes are documented ### Additional Notes <!-- Any additional information that would be helpful for reviewers --> The provider icons and flow status indicators are important visual improvements that make the application more intuitive to use. The navigation enhancements significantly improve the user experience, especially for users who are redirected to login from specific pages. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-06 22:09:18 -04:00
yindo closed this issue 2026-06-06 22:09:18 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vxcontrol/pentagi#126