Skip to content

fix(web): improve mobile layout for file browser, toolbar, and footer#154

Merged
FSM1 merged 3 commits into
mainfrom
claude/fix-mobile-web-layout-Lz4pl
Feb 19, 2026
Merged

fix(web): improve mobile layout for file browser, toolbar, and footer#154
FSM1 merged 3 commits into
mainfrom
claude/fix-mobile-web-layout-Lz4pl

Conversation

@FSM1

@FSM1 FSM1 commented Feb 19, 2026

Copy link
Copy Markdown
Owner

Mobile web layout had three main issues: the toolbar with breadcrumbs
and action buttons overflowed on narrow screens, there were no visible
action buttons for files (only right-click context menu worked on
desktop), and the footer looked sparse with hidden center links.

Changes:

  • Stack toolbar vertically on mobile (breadcrumbs above, actions below)
  • Add per-row "..." action button visible only on mobile that opens
    the context menu, replacing the need for long-press discovery
  • Hide size/date columns on mobile to make room for action button
  • Center footer content on mobile instead of spreading it edge-to-edge
  • Remove duplicate mobile overrides from layout.css (consolidated in
    responsive.css)

https://claude.ai/code/session_01HcPczWB3PzHSv2EwbSzXwo

Summary by CodeRabbit

  • New Features

    • Added a mobile action button for quick access to file context menus and a corresponding mobile action column in the file list header.
  • Style

    • Reorganized mobile file-list layout (columns now prioritize name and actions) and hid size/date columns on small screens.
    • Adjusted mobile toolbar, header and footer spacing/alignment; restored header/footer padding behavior on mobile.
    • Increased context menu minimum width for touch friendliness.

Mobile web layout had three main issues: the toolbar with breadcrumbs
and action buttons overflowed on narrow screens, there were no visible
action buttons for files (only right-click context menu worked on
desktop), and the footer looked sparse with hidden center links.

Changes:
- Stack toolbar vertically on mobile (breadcrumbs above, actions below)
- Add per-row "..." action button visible only on mobile that opens
  the context menu, replacing the need for long-press discovery
- Hide size/date columns on mobile to make room for action button
- Center footer content on mobile instead of spreading it edge-to-edge
- Remove duplicate mobile overrides from layout.css (consolidated in
  responsive.css)

https://claude.ai/code/session_01HcPczWB3PzHSv2EwbSzXwo
@coderabbitai

coderabbitai Bot commented Feb 19, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉


Walkthrough

Adds a mobile action column and button to the file list UI. FileList header gains an empty actions cell; FileListItem adds a mobile action button that synthesizes a MouseEvent to open the context menu. CSS and responsive rules add mobile-only action styling and adjust file-list/grid layouts.

Changes

Cohort / File(s) Summary
File list header
apps/web/src/components/file-browser/FileList.tsx
Inserted an empty header cell .file-list-header-actions (aria-hidden) for mobile action column alignment.
File list item behavior
apps/web/src/components/file-browser/FileListItem.tsx
Added handleActionButtonClick and a mobile action button container .file-list-item-mobile-actions; button emits a synthetic MouseEvent and calls onContextMenu; touch handling includes stopPropagation.
File browser styles
apps/web/src/styles/file-browser.css, apps/web/src/styles/responsive.css
New mobile-specific action styles (.file-list-item-mobile-actions, .file-list-item-action-btn, .file-list-header-actions); responsive layout now uses name+actions columns on mobile, hides size column, and increases context-menu min-width for touch.
Layout adjustments
apps/web/src/styles/layout.css
Removed previous mobile simplifications: .footer-center hide and reduced header/footer paddings were deleted, reverting those mobile-specific changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: improving mobile layout across three key areas (file browser, toolbar, and footer) that are the primary focus of the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/fix-mobile-web-layout-Lz4pl

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
apps/web/src/styles/responsive.css (1)

91-94: .file-list-header-name has no explicit grid-area: name — relies on auto-placement

.file-list-item-row-top correctly has grid-area: name (in file-browser.css), so item rows are robust. However, .file-list-header-name has no grid-area defined anywhere; it lands in the first column only because file-list-header-size and file-list-header-date are display: none. Adding any visible element to the header row without an explicit area would silently shift the name column out of the "name" area on mobile.

♻️ Suggested fix — add to file-browser.css
 .file-list-header-name {
   display: flex;
   align-items: center;
+  grid-area: name;
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/styles/responsive.css` around lines 91 - 94, The header's name
cell (.file-list-header-name) lacks an explicit grid-area so it relies on
auto-placement and can shift if other header elements become visible; add a rule
in file-browser.css that assigns grid-area: name to .file-list-header-name to
match .file-list-item-row-top and ensure the header always occupies the "name"
area alongside the existing .file-list-header grid-template-columns and hidden
.file-list-header-size/.file-list-header-date.
apps/web/src/styles/file-browser.css (1)

700-709: Separate :focus from :focus-visible for color/border change

The combined :hover, :focus selector applies color and border-color changes on all focus events (including mouse-click focus), not just keyboard focus. The :focus-visible rule below only adds the outline, so mouse-click focus will silently change the button's color/border with no :focus-visible indication—which is the inverse of the expected pattern.

♻️ Suggested fix
-.file-list-item-action-btn:hover,
-.file-list-item-action-btn:focus {
+.file-list-item-action-btn:hover,
+.file-list-item-action-btn:focus-visible {
   color: var(--color-text-primary);
   border-color: var(--color-green-primary);
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/styles/file-browser.css` around lines 700 - 709, The current
combined selector ".file-list-item-action-btn:hover,
.file-list-item-action-btn:focus" causes color/border changes on all focus
events (including mouse focus); update selectors so color and border changes
apply only on hover and keyboard focus-visible: replace the use of ":focus" with
":focus-visible" for the color/border rule (i.e., use
".file-list-item-action-btn:hover, .file-list-item-action-btn:focus-visible"),
keep the existing ".file-list-item-action-btn:focus-visible" rule for the
outline, and do not apply color/border styles to the plain
".file-list-item-action-btn:focus" state so mouse-click focus won't change
color/border unexpectedly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/web/src/components/file-browser/FileList.tsx`:
- Around line 122-124: The empty header element in the FileList component (the
element with className "file-list-header-actions") currently has
aria-hidden="true" which removes it from the accessibility tree and prevents the
role="columnheader" from ever being exposed; fix by removing the unconditional
aria-hidden and either drop the role (if it should be purely visual) or instead
keep the role="columnheader" and apply CSS-only hiding for desktop (e.g., hide
via media-query display/visibility classes) or use a scoped hiding utility
(visually-hidden or aria-hidden only when actually hidden) so the element is
available to assistive tech on mobile where it is visible.

In `@apps/web/src/components/file-browser/FileListItem.tsx`:
- Around line 144-160: The synthetic MouseEvent objects created in
handleActionButtonClick and handleTouchStart are missing stopPropagation,
causing a TypeError when useContextMenu.show calls event.stopPropagation();
update both synthetic event objects (the ones currently providing preventDefault
and clientX/clientY) to also include a no-op stopPropagation: () => {} so they
match the interface expected by useContextMenu.show.

---

Nitpick comments:
In `@apps/web/src/styles/file-browser.css`:
- Around line 700-709: The current combined selector
".file-list-item-action-btn:hover, .file-list-item-action-btn:focus" causes
color/border changes on all focus events (including mouse focus); update
selectors so color and border changes apply only on hover and keyboard
focus-visible: replace the use of ":focus" with ":focus-visible" for the
color/border rule (i.e., use ".file-list-item-action-btn:hover,
.file-list-item-action-btn:focus-visible"), keep the existing
".file-list-item-action-btn:focus-visible" rule for the outline, and do not
apply color/border styles to the plain ".file-list-item-action-btn:focus" state
so mouse-click focus won't change color/border unexpectedly.

In `@apps/web/src/styles/responsive.css`:
- Around line 91-94: The header's name cell (.file-list-header-name) lacks an
explicit grid-area so it relies on auto-placement and can shift if other header
elements become visible; add a rule in file-browser.css that assigns grid-area:
name to .file-list-header-name to match .file-list-item-row-top and ensure the
header always occupies the "name" area alongside the existing .file-list-header
grid-template-columns and hidden .file-list-header-size/.file-list-header-date.

Comment on lines +122 to 124
{/* Empty header cell for mobile action column - hidden on desktop via CSS */}
<div className="file-list-header-actions" role="columnheader" aria-hidden="true" />
</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

role="columnheader" is unreachable due to aria-hidden="true"

aria-hidden="true" unconditionally removes the element from the accessibility tree — including on mobile where it becomes visible via CSS. The role="columnheader" annotation is therefore never exposed to screen readers. Drop the role or replace with a scoped hide.

♻️ Suggested fix
-<div className="file-list-header-actions" role="columnheader" aria-hidden="true" />
+<div className="file-list-header-actions" aria-hidden="true" />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{/* Empty header cell for mobile action column - hidden on desktop via CSS */}
<div className="file-list-header-actions" role="columnheader" aria-hidden="true" />
</div>
{/* Empty header cell for mobile action column - hidden on desktop via CSS */}
<div className="file-list-header-actions" aria-hidden="true" />
</div>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/components/file-browser/FileList.tsx` around lines 122 - 124,
The empty header element in the FileList component (the element with className
"file-list-header-actions") currently has aria-hidden="true" which removes it
from the accessibility tree and prevents the role="columnheader" from ever being
exposed; fix by removing the unconditional aria-hidden and either drop the role
(if it should be purely visual) or instead keep the role="columnheader" and
apply CSS-only hiding for desktop (e.g., hide via media-query display/visibility
classes) or use a scoped hiding utility (visually-hidden or aria-hidden only
when actually hidden) so the element is available to assistive tech on mobile
where it is visible.

Comment thread apps/web/src/components/file-browser/FileListItem.tsx
FSM1 and others added 2 commits February 19, 2026 12:40
- Remove unreachable role="columnheader" from aria-hidden element
- Add missing stopPropagation() to synthetic MouseEvent objects in
  handleActionButtonClick and handleTouchStart (prevents TypeError
  when useContextMenu.show() calls event.stopPropagation())

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@FSM1 FSM1 temporarily deployed to claude/fix-mobile-web-layout-Lz4pl - cipher-box PR #154 February 19, 2026 11:45 — with Render Destroyed
@FSM1 FSM1 merged commit f1fa934 into main Feb 19, 2026
9 checks passed
@FSM1 FSM1 deleted the claude/fix-mobile-web-layout-Lz4pl branch February 21, 2026 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants