Skip to content

fix: make workspace icons consistent between active and inactive states - #2044

Open
xielixing wants to merge 1 commit into
GCWing:mainfrom
xielixing:fix/workspace-icon-consistency-1849
Open

fix: make workspace icons consistent between active and inactive states#2044
xielixing wants to merge 1 commit into
GCWing:mainfrom
xielixing:fix/workspace-icon-consistency-1849

Conversation

@xielixing

Copy link
Copy Markdown

Problem

Fixes #1849

When a workspace is active, it showed a \DotMatrixArrowRightIcon\ (arrow) instead of the normal folder/letter icon. This made active and inactive workspaces look like different entity types rather than siblings.

Root Cause

In \WorkspaceItem.tsx, both the assistant workspace branch and the normal workspace branch used \isActive ?\ to conditionally render different icons:

  • Active: arrow icon (\DotMatrixArrowRightIcon)
  • Inactive: folder icon (\FolderOpen) or letter avatar

Fix

Remove the \isActive\ conditional from both branches so active and inactive workspaces always use the same icon:

  • Assistant workspaces: always show the letter avatar
  • Normal workspaces: always show \FolderOpen\

The active state is still visually indicated by the existing \is-active\ CSS class, \�ria-current, and \data-workspace-active\ attributes — only the icon swap was removed.

Changes

  • \WorkspaceItem.tsx: Removed \DotMatrixArrowRightIcon\ import and the two \isActive ?\ icon conditionals
  • \WorkspaceListSection.scss: Removed dead \workspace-item-active-icon\ and \�ssistant-item-active-icon\ CSS rules, and cleaned up hover selector that referenced \�ssistant-item-active-icon\
  • \WorkspaceListSectionLayout.test.ts: Added test verifying source/stylesheet no longer contain \DotMatrixArrowRightIcon\ or \�ctive-icon\ classes

Testing

  • Validated all assertions pass (no \DotMatrixArrowRightIcon\ or \�ctive-icon\ references remain in source or stylesheet)
  • \isActive\ is still used elsewhere in the component for \is-active\ class, \�ria-current, \data-workspace-active, git info, and session logic — only the icon swap was removed
  • \FolderOpen\ import was already present and remains used

…es (GCWing#1849)

Active workspaces showed a DotMatrixArrowRightIcon (arrow) instead of the
normal folder/letter icon, making active and inactive workspaces look like
different entity types. Remove the isActive conditional from both the
assistant workspace and normal workspace branches so all rows always use
the same icon regardless of active state. Clean up now-dead SCSS rules
for the removed active-icon classes. Add a layout test to prevent
regression.
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.

[Bug]: 工作区图标不一致

1 participant