Show the project folder instead of its Git folder in the `clai2` web sidebar heading tooltip
Merged
MP
1mo ago+74+74+01234567890123456789-7-7-0123456789
- Fixes #12198
The sidebar's project heading tooltip was the raw project key, which for every Git repository is its common Git dir (…/scratch/.git). As the issue suggests, the server now sends each Project's folder next to its key (the main checkout, computed by a new project_folder helper that project_names already used inline), and the heading's title reads it. Removed folders (the \0missing key) gets folder: null, so it still has no tooltip.
Alternative considered: stripping /.git in the client. Rejected so the client doesn't parse keys, per the issue.
Tests:
tests/clai2/test_web.py::test_sidebar_project_folder_is_its_main_checkout:/api/sessionsfor a repo with a linked worktree returnsfolderwithout.git, andNonefor Removed folders.tests/clai2/browser/test_web_browser.py::test_project_heading_title_is_its_folder: the heading'stitleis the folder. It failed onmainwithActual value: /x/scratch/.git.
Checklist
- No breaking changes in accordance with the version policy.
- Any permitted compatibility impact has a label, warning, migration and release note, and an exact API-check waiver if the gate reports it.
- PR title is fit for the release changelog.
Summary by cubic
Fixes #12198: the clai2 web sidebar's project heading tooltip now shows the project's main checkout folder instead of the raw Git folder key (e.g. /x/scratch instead of /x/scratch/.git).
- The server now sends each
Project'sfolderalongside itskey, computed by a newproject_folderhelper; removed folders (\0missing) getfolder: nulland keep no tooltip. - Updated the sidebar heading and the browser test to read the new field; rejected client-side key parsing so the UI never inspects Git folders.