opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat(desktop): implement session unshare button

Open itsrainingmani opened this issue 5 days ago • 9 comments

Fixes #8602

What does this PR do?

Desktop app is currently missing a way to unshare a session once it's been shared (users have to use the TUI to manage their session shares). This PR implements a session unshare button w/ the following features

  • Stack share URL and unshare button vertically to give the URL full width
  • Add loading feedback and disable buttons during operations to prevent double-clicks
  • Rely on reactive sync.data for URL

https://github.com/user-attachments/assets/f15ab17a-fd46-48dc-9d89-d3ea776002f3

How did you verify your code works?

https://github.com/user-attachments/assets/1ee4ba0e-3bd0-4ba6-85ba-dbb2bfb6c079

itsrainingmani avatar Jan 15 '26 11:01 itsrainingmani

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

github-actions[bot] avatar Jan 15 '26 11:01 github-actions[bot]

Active Indicator for Share Session Icon

https://github.com/user-attachments/assets/30a280da-706a-403a-bcff-11d2497f379b

itsrainingmani avatar Jan 15 '26 12:01 itsrainingmani

We actually have designs for the share that I haven't gotten to; David is going to provide a figma link soon, here's a preview: Screenshot 2026-01-15 at 10 04 31 AM

adamdotdevin avatar Jan 15 '26 16:01 adamdotdevin

@itsrainingmani here's the figma from David with share designs; you up for implementing it like this? https://www.figma.com/design/nm7fT1he2hcniHIipY1iEk/opencode-open-source?node-id=0-1&t=QNGpcwD0eJHtycRF-1

adamdotdevin avatar Jan 15 '26 19:01 adamdotdevin

@itsrainingmani here's the figma from David with share designs; you up for implementing it like this? https://www.figma.com/design/nm7fT1he2hcniHIipY1iEk/opencode-open-source?node-id=0-1&t=QNGpcwD0eJHtycRF-1

Yeah I will make the changes tonight and push 🫡

itsrainingmani avatar Jan 15 '26 22:01 itsrainingmani

For consistency, could we get the /unshare command as well as a mere button? I (and other users too, I'm sure) would likely intuitively expect to be able to use the same set of commands that work in the TUI in the desktop application - users have become accustomed to banging out these commands and trained doing so into their muscle memory as a reflex. it could come as an unexpected surprise while working if this turned out to not to be the case, potentially distracting the user and breaking a developer's focus on their work.

Adherence to the principle of least surprise would be improved if the available commands were symmetrical between the TUI and the desktop application.

ariane-emory avatar Jan 16 '26 00:01 ariane-emory