Skip to content

[6207] fix(frontend): Keep session titles readable on phones - #6280

Open
vedtod07 wants to merge 2 commits into
Agenta-AI:mainfrom
vedtod07:fix/6207-mobile-session-title
Open

[6207] fix(frontend): Keep session titles readable on phones#6280
vedtod07 wants to merge 2 commits into
Agenta-AI:mainfrom
vedtod07:fix/6207-mobile-session-title

Conversation

@vedtod07

@vedtod07 vedtod07 commented Aug 25, 2026

Copy link
Copy Markdown

Closes #6207

Summary

On /m, a session title such as Reply with exactly: DURABLE rendered as R.... The shared SessionRow pinned the agent name at 160px (w-40 shrink-0) and the timestamp at 96px, so the title was the only flex child and collapsed on a 390px phone.

Changes

Below md, the agent name moves under the title. Desktop keeps the original single-line w-40 slot (hidden md:block). The timestamp no longer forces 96px on phones.

Before (phone): (icon) R... Tool call QA matrix 7a... 1d ago (pin)
After (phone): title stays on the first line; agent name sits on the second line.

Testing

Verified locally

  • Prettier on the two touched files.
  • Could not run pnpm --filter @agenta/sessions-ui test on this machine (pnpm not on PATH). Please run that plus lint in CI / locally.

Added or updated tests

  • SessionRow.test.ts: asserts the phone slot (md:hidden) and desktop slot (hidden md:block w-40).

QA follow-up

Demo

Before and after of the /m session row at 390px
Layout mock of the 390px row. Real-phone screenshots still belong in QA as requested on #6207.

Checklist

  • I have included a video or screen recording for UI changes, or marked Demo as N/A
  • Relevant tests pass locally
  • Relevant linting and formatting pass locally
  • I have signed the CLA, or I will sign it when the bot prompts me

The shared SessionRow pinned the agent name at 160px, so phone titles
collapsed to a single letter. Move the agent under the title below md.
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. frontend tests ui labels Aug 25, 2026
@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

@vedtod07 is attempting to deploy a commit to the agenta projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

✅ Thanks @vedtod07! This PR now meets the contribution requirements and has been reopened. A maintainer will review it soon.

@github-actions github-actions Bot added the incomplete-pr PR is missing required template sections or a demo recording label Aug 25, 2026
@github-actions github-actions Bot closed this Aug 25, 2026
@CLAassistant

CLAassistant commented Aug 25, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Improved session row responsiveness on smaller screens.
    • Agent names now appear beneath session titles on mobile devices.
    • Adjusted timestamp and control spacing for better mobile layouts.
    • Preserved the desktop layout with a fixed-width agent information area.
  • Tests

    • Added coverage verifying responsive agent-name placement and desktop visibility behavior across screen sizes.

Walkthrough

SessionRow now renders agent labels through a shared helper and uses responsive placement. Mobile rows place the agent name below the title. Desktop rows retain the trailing agent slot. Unit tests verify the responsive layout classes.

Changes

Responsive session row layout

Layer / File(s) Summary
Agent label rendering
web/packages/agenta-sessions-ui/src/SessionRow.tsx
A shared helper uses renderAgent when provided and otherwise renders SessionAgentName.
Responsive agent placement and validation
web/packages/agenta-sessions-ui/src/SessionRow.tsx, web/packages/agenta-sessions-ui/tests/unit/SessionRow.test.ts
Mobile rows render the agent name below the title. Desktop rows keep the trailing agent slot. The timestamp keeps its fixed width only from md upward. Tests verify mobile and desktop visibility classes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🟡 Moderate · up to fea10

On phones, a supplied agent link can be rendered inside the session title button, which may cause conflicting taps and invalid interactive behavior. Move the agent content outside the title button before merging.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: preserving session title readability on phones.
Description check ✅ Passed The description directly explains the mobile truncation defect, responsive layout changes, testing, and expected desktop behavior.
Linked Issues check ✅ Passed The changes satisfy the coding objectives in issue #6207 by prioritizing mobile session titles, moving the agent name below the title below md, relaxing the mobile timestamp width, and preserving the …
Out of Scope Changes check ✅ Passed The reviewed source and test changes are directly related to the mobile SessionRow layout fix and do not show unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Full details: Linked Issues check

Explanation

The changes satisfy the coding objectives in issue #6207 by prioritizing mobile session titles, moving the agent name below the title below md, relaxing the mobile timestamp width, and preserving the desktop layout. Manual device validation requirements are outside this coding assessment.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions Bot removed the incomplete-pr PR is missing required template sections or a demo recording label Aug 25, 2026
@github-actions github-actions Bot reopened this Aug 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
web/packages/agenta-sessions-ui/tests/unit/SessionRow.test.ts (1)

118-132: 🎯 Functional Correctness | 🔵 Trivial

Run browser validation for both session surfaces.

SessionRow.test.ts checks class names only. The /m Home sessions block uses the separate row implementation inside SessionCardList, so this test does not cover it. Validate 390px portrait and landscape layouts on Android Chrome and iOS Safari, including long titles and status, badge, timestamp, pin, and menu controls.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: cea8456c-5875-4468-b59c-fb183c038bfe

📥 Commits

Reviewing files that changed from the base of the PR and between a09a0f0 and fea102d.

⛔ Files ignored due to path filters (1)
  • .github/pr-assets/6280-session-row-phone.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • web/packages/agenta-sessions-ui/src/SessionRow.tsx
  • web/packages/agenta-sessions-ui/tests/unit/SessionRow.test.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Comment on lines +102 to 105
{showAgent ? (
<span className="w-full min-w-0 truncate md:hidden">{renderAgentLabel()}</span>
) : null}
</button>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Verify whether SessionRow callers provide interactive custom agent renderers.
rg -n -C 6 '\brenderAgent\b' web/packages/agenta-sessions-ui web --glob '*.{ts,tsx}'

Repository: Agenta-AI/agenta

Length of output: 6739


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- SessionRow.tsx relevant source ---'
sed -n '1,145p' web/packages/agenta-sessions-ui/src/SessionRow.tsx

printf '%s\n' '--- renderAgent prop assignments/usages ---'
rg -n -C 8 'renderAgent\s*=' web/packages --glob '*.{ts,tsx}'

Repository: Agenta-AI/agenta

Length of output: 6498


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- SessionRow call sites ---'
rg -n -C 10 '<SessionRow\b|SessionRow\s*\(' web/packages --glob '*.{ts,tsx}'

printf '%s\n' '--- renderAgent identifiers outside the declaration ---'
rg -n -C 6 '\brenderAgent\b' web/packages --glob '*.{ts,tsx}'

Repository: Agenta-AI/agenta

Length of output: 16825


Keep interactive agent content outside the title button.

When a caller supplies the documented link surface through renderAgent, this mobile branch renders it inside the title <button>. The nested control can trigger onOpen and violates button content rules. Move the mobile label into a sibling container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend size:S This PR changes 10-29 lines, ignoring generated files. tests ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[mobile] /m sessions list: agent name crowds out the session title (one letter visible)

2 participants