Skip to content

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Jul 28, 2025

Related Issue

Issue: #XXXX

Description

  • Add new Navbar component for consistent navigation
  • Restructure App.tsx to use flex layout with proper container
  • Update ChatView to include navbar and reorganize imports
  • Update ExtensionStateContext with navbar-related state management
  • Check for data-showNavbar attribute on document element and update navbar state accordingly

Test Procedure

When data-show-navbar attribute on document element is set to true (e.g. <html data-show-navbar="true">, the nav bar will be displayed in the Chat View. Otherwise, the navbar should never be shown.

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)
  • ♻️ Refactor Changes
  • 💅 Cosmetic Changes
  • 📚 Documentation update
  • 🏃 Workflow Changes

Pre-flight Checklist

  • Changes are limited to a single feature, bugfix or chore (split larger changes into separate PRs)
  • Tests are passing (npm test) and code is formatted and linted (npm run format && npm run lint)
  • I have created a changeset using npm run changeset (required for user-facing changes)
  • I have reviewed contributor guidelines

Screenshots

image

Additional Notes


Important

Add Navbar component and restructure app layout to include it, updating state management and navigation functions accordingly.

  • Behavior:
    • Add Navbar component in Navbar.tsx for consistent navigation across views.
    • Restructure App.tsx to use a flex layout and include Navbar.
    • Update ChatView.tsx to conditionally render Navbar based on IS_STANDALONE flag.
  • State Management:
    • Update ExtensionStateContext.tsx to manage navbar-related state and navigation functions.
    • Add navigation functions: navigateToHistory, navigateToSettings, navigateToAccount, navigateToMcp, navigateToChat.
  • Misc:
    • Reorganize imports in ChatView.tsx for better structure.

This description was created by Ellipsis for 8e0c889. You can customize this summary. It will automatically update as commits are pushed.

- Add new Navbar component for consistent navigation
- Restructure App.tsx to use flex layout with proper container
- Update ChatView to include navbar and reorganize imports
- Enhance ExtensionStateContext with navbar-related state management
Copy link

changeset-bot bot commented Jul 28, 2025

⚠️ No Changeset found

Latest commit: 8e0c889

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Jul 28, 2025

Coverage Report

Extension Coverage

Base branch: 46%

PR branch: 47%

✅ Coverage increased or remained the same

Webview Coverage

Base branch: 17%

PR branch: 17%

⚠️ Warning: Coverage decreased by 0.05%

Consider adding tests to cover your changes.

Overall Assessment

⚠️ Test coverage has decreased in this PR

Please consider adding tests to maintain or improve coverage.

Last updated: 2025-07-29T16:35:20.843965

abeatrix added 3 commits July 28, 2025 23:05
Check for data-showNavbar attribute on document element and update navbar state accordingly
@abeatrix abeatrix requested a review from sjf July 29, 2025 06:24
@abeatrix abeatrix marked this pull request as ready for review July 29, 2025 06:24
@Copilot Copilot AI review requested due to automatic review settings July 29, 2025 06:24
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a navigation bar component and restructures the app layout to support conditional navbar display based on a document attribute.

  • Adds a new Navbar component with navigation icons for different app sections
  • Updates the ExtensionStateContext to manage navbar visibility state
  • Restructures App.tsx to use flexbox layout for better container management

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
webview-ui/src/context/ExtensionStateContext.tsx Adds navbar state management and reorganizes imports
webview-ui/src/components/menu/Navbar.tsx Creates new navigation bar component with icon buttons
webview-ui/src/components/chat/ChatView.tsx Integrates navbar into chat view and reorganizes imports
webview-ui/src/App.tsx Restructures layout to flex container and adds navbar initialization logic
Comments suppressed due to low confidence (2)

webview-ui/src/components/menu/Navbar.tsx:51

  • The ID 'navbar-header' is misleading since this appears to be the entire navbar component, not just a header section. Consider renaming to 'navbar' or 'navigation-bar' for clarity.
			id="navbar-header"

webview-ui/src/components/menu/Navbar.tsx:10

  • The constant name 'SETTINGS_TABS' is inaccurate as it includes navigation items beyond just settings (Chat, MCP, History, Account). Consider renaming to 'NAVIGATION_ITEMS' or 'NAV_TABS' to better reflect its purpose.
	const SETTINGS_TABS = useMemo(

@sjf
Copy link
Contributor

sjf commented Jul 29, 2025

There is already a property you use to tell if the webview is running inside of vscode or not, there is a property on the window __is_standalone__, e.g.

__is_standalone__?: boolean

Remove showNavbar state management and related useEffect from App.tsx.
Replace conditional navbar rendering with IS_STANDALONE window property
check. Update Navbar component to use semantic nav element and remove
conditional rendering logic.
@sjf sjf merged commit c54f0da into main Jul 29, 2025
13 checks passed
@abeatrix abeatrix deleted the bee/navbar branch July 29, 2025 17:20
dtrugman pushed a commit to dtrugman/cline that referenced this pull request Aug 24, 2025
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.

2 participants