Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rework Update Tab #1479

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Stijnus
Copy link
Collaborator

@Stijnus Stijnus commented Mar 8, 2025

Update Tab and API Improvements

Changes Made

UpdateTab.tsx

  1. Enhanced Repository Status Display

    • Added current branch information
    • Added latest commit message display
    • Improved commit hash display
    • Added changelog section
    • Added "Coming Soon" status for Automatic Updates
    • Added branch-specific update notifications
  2. Improved Manual Update Instructions

    • Added step-by-step git configuration
    • Added branch-specific instructions
    • Added helpful notes about upstream configuration
    • Better command formatting and descriptions
    • Added clear completion indicators with green checkmarks
    • Added info message about Main Branch Updates feature
  3. Better Error Handling

    • More descriptive error messages
    • Better handling of git configuration issues
    • Improved toast notifications
    • Added error logging
    • Added visual feedback for update check completion
  4. UI Improvements

    • Better spacing and layout
    • Added status indicators with colored icons
    • Improved readability of git commands
    • Better dark mode support
    • Added green success indicators for completed operations
    • Improved visibility of update status messages
    • Added informative banners for feature availability
  5. Feature Integration

    • Added connection with Features Tab for branch selection
    • Improved automatic update check logic based on selected branch
    • Added clear UI feedback about branch selection
    • Added guidance for enabling Main Branch Updates

api.update.ts

  1. Added Server-Side Git Information

    • Current commit hash retrieval
    • Current branch detection
    • Latest commit message display
    • Safe command execution with error handling
  2. Better Response Structure

    • Added detailed git status information
    • Branch-specific update instructions
    • Better error handling and status codes
    • Informative changelog messages

Key Features

  • Better git integration with proper upstream configuration
  • Improved error messages and user guidance
  • Enhanced repository status information
  • Better handling of server environments
  • Branch-aware update instructions
  • Clear visual feedback for update status
  • Integration with Features Tab for branch selection
  • Improved automatic update checking logic

Testing

  1. Check update detection with:
    git remote add upstream https://github.com/stackblitz-labs/bolt.diy.git
    git fetch upstream
    git branch --set-upstream-to=upstream/main main
  2. Verify branch detection and commit information display
  3. Test error handling with invalid git configurations
  4. Verify update instructions match current branch
  5. Test automatic update checks with different branch settings
  6. Verify visual feedback for completed operations
  7. Test integration with Features Tab branch selection

Screenshots

screencapture-localhost-5173-2025-03-08-17_41_32

@leex279
Copy link
Collaborator

leex279 commented Mar 8, 2025

@Stijnus I did not go deeper already, but I see on the screenshot that you refering to main branch. I dont think this is what we normally want on a "release"/stable branch. I should be more tied to the stable one.
Normally developers/tester will know how to update anyway.

@Stijnus
Copy link
Collaborator Author

Stijnus commented Mar 8, 2025

Normaly it will check what branch the user is using and based on that it will check for updates.

Stijnus added 2 commits March 9, 2025 12:25
The system will pull updates based on your actual current branch, regardless of the setting in Features. Here's how it works:
If you're on main branch:
It will pull updates from upstream/main
This is shown in the git command: git pull upstream main
If you're on stable branch:
It will pull updates from upstream/stable
This is shown in the git command: git pull upstream stable
If there's a mismatch (e.g., you're on main but have stable updates selected in Features):
You'll see a warning message
But it will still pull from your actual current branch
The system prioritizes your actual git branch over the Features setting
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.

4 participants