feat(tui): add named workspace favorites - #243
The pull request is sound. Both prior findings are resolved: `after_saving_favor
The pull request is sound. Both prior findings are resolved: after_saving_favorite now follows the saved workspace to its actual ranked row instead of assuming row 0, and serialization failure is handled with a status message rather than a panic. The new tests are substantive — they assert on persisted file contents, in-memory state, cursor position, and selected workspace after save, and they exercise the failure, no-config, no-hosting, and rename-under-filter paths. The mouse-swallow test asserts that a click behind the prompt neither dismisses it nor selects a picker row. No new behavioural concerns found. (2 earlier finding(s) still open) The code index for this repository is cold, so this review saw the diff alone.
No findings.
Fixed since the last review
- after_saving_favorite assumes the saved workspace is at row 0 — Fixed.
after_saving_favoritenow searchesworkspace_choicesfor the saved path and setsworkspace_indexto its actual position, with a fallback that re-points the query when the saved workspace is absent from the filtered list. The testsaving_a_favorite_reanchors_the_cursor_on_its_actual_row_when_filtered_behind_another_matchvalidates the non-zero-row case. - Avoid panicking on serialisation failure — Fixed.
save_favorite_workspacenow useslet Ok(value) = toml::Value::try_from(...) else { self.set_status(...); return; };instead of unwrapping, and the failure path leaves in-memory favorites untouched.