fix(desktop): preserve project session profiles - #89736
Open
honki12345 wants to merge 1 commit into
Open
Conversation
Why: - Project-grouped session rows dropped their persisted profile identity, so Show → Profile treated named profiles as default and rendered no badge. What: - Project profile_name as the existing client-facing profile field. - Cover named and default identities through overview and drill-in RPCs. Verification: - scripts/run_tests.sh tests/tui_gateway/test_projects_rpc.py tests/tui_gateway/test_project_tree.py -q (58 passed) - ruff check tui_gateway/server.py tests/tui_gateway/test_projects_rpc.py - python scripts/check-windows-footguns.py tui_gateway/server.py tests/tui_gateway/test_projects_rpc.py - Independent review: no findings, confidence 0.98 Risk: - Low; adds an existing optional response field to project session rows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes Hermes Desktop's Filters → Show → Profile option for session rows rendered inside Project grouping.
Project overview and drill-in rows come from the shared
projects.treeprojection. That projection dropped the persistedprofile_name, so the renderer received nosession.profile, normalized the row todefault, and intentionally suppressed the profile glyph. The session itself was still correctly owned by the named profile; only its display metadata was missing.This PR projects the existing profile identity into the response once, at the shared backend boundary. Named-profile project rows can therefore use the existing
ProfileTagrendering path, while rows whose persisted profile isNULLretain the canonicaldefaultidentity and existing default-profile UI behavior.This is distinct from #86258 / #86259, which covers ordinary flat All Profiles recents and explicitly leaves scoped/project views unchanged.
Related Issue
Fixes #89731
Related: #72767, #86258
Type of Change
Changes Made
tui_gateway/server.pydefaultidentityprojects.treeoverview rows andprojects.project_sessionsdrill-in rows through their shared projectiontests/tui_gateway/test_projects_rpc.pystate.db→ project RPC response pathHow to Test
Profile: <name>accessible label.Automated verification:
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass — the focused and neighboring project RPC/tree suites passed; the full repository suite was not run locallyDocumentation & Housekeeping
docs/, docstrings) — N/A; no documented command or configuration changedcli-config.yaml.exampleif I added/changed config keys — N/A; no config changesCONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/A; existing response contract onlyScreenshots / Logs
The original UI symptom is captured in #89731. The regression test records the exact response-shape failure (
profileabsent) and proves the repaired named/default profile contract through both project RPCs.