feat(desktop): make window title reflect currently selected project a…#31425
Open
OnkelTem wants to merge 1 commit into
Open
feat(desktop): make window title reflect currently selected project a…#31425OnkelTem wants to merge 1 commit into
OnkelTem wants to merge 1 commit into
Conversation
f83281f to
84520ae
Compare
84520ae to
1b61c98
Compare
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.
Issue for this PR
Closes #31423
Type of change
What does this PR do?
The browser window title was static ("OpenCode") regardless of which project or session was active, making it hard to identify tabs when multiple OpenCode windows are open.
Сhanges
Added a reactive
createEffectin the layout component that updatesdocument.titlebased on the current project and session.The title now shows a single-letter initial, optional session name, and project name (e.g.
M|Refactor store - MyProject).Small refactor: As I also needed the
first()function fromproject-avatar-v2.tsx/avatar-v2.tsx(dups?), I extracted it from those and placed into./utils/*and exported.How did you verify your code works?
Tested in web ui.
Screenshots / recordings
https://www.youtube.com/watch?v=TFx2Pl_9Nv4
Checklist