Skip to content

Conversation

@aliraza556
Copy link
Contributor

Problem

Previously, users could access Hive Chat without having a properly configured workspace. This led to failed requests, confusion, and poor user experience when attempting to use Hive Chat without the necessary setup:

  • Code Graph URL
  • Secret Alias
  • CodeSpace URL
  • GitHub username
  • GitHub PAT (Personal Access Token)

Additionally, expired GitHub PATs were only detected after attempting to send a message, resulting in runtime errors.

Solution

This PR implements validation checks for workspace configuration and GitHub PAT validity before allowing users to send messages in Hive Chat.

Key Changes:

  • Workspace Setup Validation: Check for all required workspace configuration fields
  • GitHub PAT Verification: Validate PAT using GitHub API before message execution
  • Enhanced User Feedback: Show informative splash screens for incomplete setup
  • UI Improvements: Disable input field and buttons when setup is incomplete
  • Navigation Help: Add direct links to settings page to complete workspace setup

User Experience Improvements

  • Clear Guidance: Users immediately see why Hive Chat isn't working and how to fix it
  • Proactive Validation: Issues are caught before attempting to send messages
  • Reduced Errors: Prevents failed API requests due to missing configuration
  • Streamlined Setup: Direct links to settings page make it easy to complete configuration

Technical Implementation

  • Added getCodeSpaceConfig method to MainStore
  • Added validation functions for workspace setup and GitHub PAT
  • Enhanced ChatSplashScreen component to show conditional content
  • Integrated axios for GitHub API requests
  • Added state management for tracking validation status

Testing Instructions

  1. Create a new workspace with incomplete configuration (missing code graph, alias, or PAT)
  2. Access Hive Chat - verify you see the "Workspace Incomplete" screen
  3. Try with expired/invalid GitHub PAT - verify the appropriate message is displayed
  4. Complete all required configuration - verify you can use Hive Chat normally

Closed: #1545

Demo:

https://www.loom.com/share/bbda623f74b8424eaba2772e374d8e44

image

@aliraza556
Copy link
Contributor Author

@tomsmith8 Please review this PR.

@tomsmith8 tomsmith8 requested a review from kevkevinpal July 22, 2025 08:02
Copy link
Collaborator

@kevkevinpal kevkevinpal left a comment

Choose a reason for hiding this comment

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

Looks good, I'm going to merge if you can fix the two comments I made in a followup PR

@kevkevinpal kevkevinpal merged commit d3f0028 into stakwork:master Aug 22, 2025
68 checks 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.

Setup codespace

2 participants