Commit 5b3a9e6
authored
fix: Link opencode session and opencode tui extension
* fix: properly isolate workflow state by OpenCode session ID
The TUI plugin was incorrectly falling back to the most recently modified
workflow state when no state was found for the current session. This caused
new OpenCode sessions to display workflow state from previous sessions.
Changes:
1. Remove fallback to readLatestState() in TUI plugin initialization
2. Remove fallback to readLatestState() in event handler
3. Remove unused readLatestState() function
4. Only use session ID-based state lookup to ensure proper isolation
This ensures that when a new OpenCode session starts with no active workflow,
the TUI correctly shows no workflow state instead of showing the previous
session's workflow.
* ui: show 'No Active Workflow' in TUI when no workflow is active for the session
When the TUI plugin detects that no workflow state exists for the current
OpenCode session, it now explicitly displays 'No Active Workflow' instead of
hiding the component. This makes it clear that no workflow is currently
active, rather than being ambiguous about the state.
This improves UX by:
- Making the workflow state always visible
- Being explicit about the absence of an active workflow
- Guiding users to start a workflow when needed1 parent 560ecee commit 5b3a9e6
2 files changed
Lines changed: 51 additions & 59 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
| 135 | + | |
133 | 136 | | |
134 | 137 | | |
135 | 138 | | |
| |||
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
152 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
153 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
154 | 170 | | |
155 | 171 | | |
156 | 172 | | |
| |||
234 | 250 | | |
235 | 251 | | |
236 | 252 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
241 | 269 | | |
242 | 270 | | |
243 | 271 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | 89 | | |
133 | 90 | | |
134 | 91 | | |
| |||
145 | 102 | | |
146 | 103 | | |
147 | 104 | | |
148 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
149 | 108 | | |
150 | | - | |
| 109 | + | |
151 | 110 | | |
152 | 111 | | |
153 | 112 | | |
| |||
158 | 117 | | |
159 | 118 | | |
160 | 119 | | |
161 | | - | |
| 120 | + | |
| 121 | + | |
162 | 122 | | |
163 | | - | |
| 123 | + | |
164 | 124 | | |
165 | 125 | | |
166 | 126 | | |
167 | 127 | | |
168 | 128 | | |
169 | | - | |
| 129 | + | |
170 | 130 | | |
171 | 131 | | |
172 | 132 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
178 | 142 | | |
179 | 143 | | |
180 | 144 | | |
| |||
0 commit comments