Commit 80c25de
Add Stop, Restart, and Force Rebuild menu items to Tsunami view (#2483)
Adds settings menu items to the Tsunami app view for stopping and
restarting the controller, with support for forcing rebuilds that bypass
the build cache.
### Changes
- **Added three menu items** to
`TsunamiViewModel.getSettingsMenuItems()`:
- "Stop WaveApp" - stops the running tsunami controller using
`ControllerStopCommand`
- "Restart WaveApp" - stops the controller, waits 300ms, then resyncs to
restart it (uses existing cache if available)
- "Restart WaveApp and Force Rebuild" - triggers
`ControllerResyncCommand` with `forcerestart: true` (bypasses build
cache per line 228 in `tsunamicontroller.go`)
- **Refactored controller resync logic** - extracted common code into
`doControllerResync()` helper with optional `triggerRestart` parameter
to handle both user-initiated restarts and automatic mount sync
- **Implemented proper restart behavior** - "Restart WaveApp" now
performs a stop → wait → resync sequence to ensure the controller
actually restarts instead of just resyncing to the already-running state
### Implementation Note
No backend changes required. The existing
`CommandControllerResyncData.ForceRestart` flag already controls cache
bypass behavior in the tsunami controller's build logic, and
`ControllerStopCommand` is used for stopping the controller.
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: sawka <[email protected]>1 parent 755d978 commit 80c25de
1 file changed
+64
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
79 | | - | |
| 85 | + | |
80 | 86 | | |
81 | | - | |
| 87 | + | |
82 | 88 | | |
83 | 89 | | |
84 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
85 | 100 | | |
86 | 101 | | |
87 | 102 | | |
88 | 103 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
95 | 127 | | |
96 | 128 | | |
97 | 129 | | |
| |||
125 | 157 | | |
126 | 158 | | |
127 | 159 | | |
128 | | - | |
| 160 | + | |
129 | 161 | | |
130 | 162 | | |
131 | 163 | | |
| |||
134 | 166 | | |
135 | 167 | | |
136 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
137 | 190 | | |
138 | 191 | | |
139 | 192 | | |
| |||
0 commit comments