Skip to content

fix(pi): Pi read, search, and edit rows show the same label on mobile as on web - #29864

Open
saphid wants to merge 2 commits into
pingdotgg:mainfrom
saphid:fix/pi-tool-row-labels
Open

saphid wants to merge 2 commits into
pingdotgg:mainfrom
saphid:fix/pi-tool-row-labels

Conversation

@saphid

@saphid saphid commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Problem

On mobile, rows for Pi's built-in tools show only the raw tool name. A Pi read shows "Read" with no file, grep/find/ls show "Grep"/"Find"/"Ls", and a single edit/write shows "Edit"/"Write". Web shows "Read src/a.ts", "Searched foo in src", and the changed file for the same items, and so does mobile for every other provider.

The cause is that the Pi adapter sets each file-change and generic tool item's title to the Pi tool name. Mobile's itemSummary treats a non-empty title as the label, while web mostly works the label out from the item. No other adapter does this: Cursor leaves title null, and Claude, OpenCode, ACP, and Cursor set read and search titles with formatReadToolLabel/formatSearchToolLabel.

Change

emitToolItem in packages/provider-pi/src/server/adapter.ts now sets title: null on file_change and dynamic_tool items, like Cursor's default. Both clients then derive the same label. MCP tools keep their title from the mcpToolPresentation spread that follows. Command items still use bash/powershell, which an existing test pins to tell the two shells apart.

Scope and approval

Very small, focused fix for an obvious bug, so no prior issue: one adapter labels tools differently from all of its siblings, and the change is 2 lines plus 2 assertions in existing tests.

Overlap search: I searched the PR index and GitHub for Pi tool titles and labels. #27607 (Pi task lists) adds a separate todo-list emitter and does not touch these lines. #16529 (Cua) and #27521 (nested Pi tools) do not change Pi item titles either.

Verification

  • Red on main: the new assertions in adapter.test.ts fail with AssertionError: expected 'read' to equal null, and the file-change assertion in "persists edit patches and write content on file change items" also fails.
  • Green: vp test run src/server/adapter.test.ts (packages/provider-pi) passes 93/93, including after rebasing on current main.
  • vp run check:changed passes: format, lint, knip, typecheck (9 packages), tests 94/94.
  • Runtime check of mobile buildThreadFeed with a throwaway test (not committed), using Pi-shaped items:
    title=raw  dynamic_tool/read summary="Read"                detail=null
    title=raw  dynamic_tool/grep summary="Grep"                detail=null
    title=raw  file_change       summary="Edit"                detail="src/a.ts"
    title=null dynamic_tool/read summary="Read src/a.ts"       detail=null
    title=null dynamic_tool/grep summary="Searched foo in src" detail=null
    title=null file_change       summary="Changed src/a.ts"    detail="src/a.ts"
    
  • Not checked: a real Pi session in the mobile app or a screenshot capture. The label change comes from the client logic shown above.

Reviewed with sol-loop: 1 round with GPT-6.1 Sol on high. Sol verdict: approved.

Created with Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

… as on web

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 3, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at b16fd34

Macroscope's review found this PR approvable — Pi tool rows now use existing descriptive labels instead of raw tool names, aligning mobile presentation with web. The change affects display metadata only, without changing tool execution or permissions.

No code changes detected at ec21173. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Pi adapter now sets file-change and dynamic-tool item titles to null. Tests assert these values, except that the dynamic-tool test expects "extension" for case 4.

Changes: Pi adapter item titles

Layer / File(s) Summary
Item title mapping and assertions
packages/provider-pi/src/server/adapter.ts, packages/provider-pi/src/server/adapter.test.ts
File-change and dynamic-tool items use null titles. Tests assert null titles, except for the dynamic-tool extension case.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge, only21mil

Merge Risk: Minimal · up to ec211

This change makes Pi read, search and edit rows show the same label on mobile as on web. The only side effect is that file-change rows no longer show the tool name, and this matches the stated intent. Merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the Pi read, search, and edit rows and the mobile label mismatch. The changeset sets file_change and dynamic_tool titles to null in the Pi adapter, which removes the raw tool name that…
Description check Passed The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section gives the reproduction and expected behavior. The Change section explains the one-file fix …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the Pi read, search, and edit rows and the mobile label mismatch. The changeset sets file_change and dynamic_tool titles to null in the Pi adapter, which removes the raw tool name that mobile was showing as the label. The title matches the main change, and it follows the conventional commit form used in the template.

Full details: Description check

Explanation

The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section gives the reproduction and expected behavior. The Change section explains the one-file fix and why Command items keep their titles. The Scope section explains why no issue is linked and includes an overlap search. The Verification section lists red and green test runs, a runtime check, and what was not checked. The description does not link a GitHub issue, but the Scope section gives a reason for omitting one, which the template allows for small obvious bugs. The description also does not include screenshots. The template asks for before and after screenshots for UI changes. The author says the label change comes from client logic and that no screenshot capture was done, so the UI evidence gap is stated but not closed.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

Note

This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b16fd34 and ec21173.

Files selected for processing: 2

  • packages/provider-pi/src/server/adapter.test.ts
  • packages/provider-pi/src/server/adapter.ts

Limit details: You’ve used all 10 included reviews currently available.

@saphid

saphid commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

Review requested

Date (UTC) Reviewer Where
2026-11-13 Julius Discord DM

Logged so this PR shows when a maintainer was asked to review it.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 14, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge juliusmarminge added takeover:needs-julius Takeover done; route gate says Julius decides and removed takeover:in-progress A takeover lead is working on this PR labels Nov 14, 2026

This branch has not been deployed

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

Labels

size:XS 0-9 changed lines (additions + deletions). takeover:needs-julius Takeover done; route gate says Julius decides vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants