Skip to content

Conversation

@spider-yamet
Copy link
Contributor

@spider-yamet spider-yamet commented Feb 11, 2026

Summary

Fixes file explorer alignment and spacing so folder/file entries line up and spacing is consistent (resolves #1217).

Changes

Layout

  • First column: File rows now use a fixed 16×16 box (same as folder chevron) instead of a width-only spacer, so icons and labels align vertically for both folders and files.
  • Spacing: Added gap-2 on each row and removed mr-2 from icons so spacing between chevron/spacer, icon, and label is uniform (8px).
  • Accessibility: File spacer has aria-hidden so it’s ignored by assistive tech.

Code

  • src/components/Folder/index.tsx
    • File spacer: w-4flex h-4 w-4 flex-shrink-0 items-center justify-center + aria-hidden.
    • Folder chevron wrapper: added flex-shrink-0 for consistent first-column width.
    • Row button: added gap-2, removed mr-2 from FolderIcon, file icon, and FileText.
    • Exported FileTree for unit tests.

Tests

  • test/unit/components/Folder/FileTree.test.tsx (new)
    • Renders folder and file rows.
    • First column uses consistent h-4/w-4 for alignment.
    • Row uses gap-2 for spacing.
    • File spacer has aria-hidden.
    • onToggleFolder / onSelectFile on click.
    • Returns null when node has no children.

Testing

  • npm run lint — pass
  • npm run test -- --run test/unit/components/Folder/FileTree.test.tsx — 7 tests pass

##Resolves

@spider-yamet
Copy link
Contributor Author

Image

@Wendong-Fan @Pakchoioioi @bytecii Could you please review my PR?

Regards

@Pakchoioioi
Copy link
Contributor

Screenshot 2026-02-11 at 18 04 35 Functional requirements met. Ready for code review.

Copy link
Collaborator

@bytecii bytecii left a comment

Choose a reason for hiding this comment

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

LGTM

@bytecii bytecii merged commit 993392f into eigent-ai:main Feb 12, 2026
7 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.

[Feature Request] refactor file list alignment and layout inconsistencies

3 participants