| @@ -16,14 +16,22 @@ pub struct Item { |
| 16 | 16 | pub fold: Option<&'static str>, |
| 17 | 17 | /// Sorts after every other match, like keybinding commands. |
| 18 | 18 | pub secondary: bool, |
| 19 | + /// Where to jump instead when the row isn't shown, such as a row only |
| 20 | + /// one choice of another reveals. |
| 21 | + pub fallback: Option<&'static str>, |
| 19 | 22 | } |
| 20 | 23 | |
| 21 | 24 | const fn item(id: &'static str, title: &'static str, page: Page, terms: &'static str) -> Item { |
| 22 | | - Item { id, title, page, terms, fold: None, secondary: false } |
| 25 | + Item { id, title, page, terms, fold: None, secondary: false, fallback: None } |
| 26 | + } |
| 27 | + |
| 28 | + /// A row that's only shown sometimes; the jump falls back to `fallback`. |
| 29 | + const fn revealed(id: &'static str, title: &'static str, page: Page, terms: &'static str, fallback: &'static str) -> Item { |
| 30 | + Item { id, title, page, terms, fold: None, secondary: false, fallback: Some(fallback) } |
| 23 | 31 | } |
| 24 | 32 | |
| 25 | 33 | const fn folded(id: &'static str, title: &'static str, page: Page, terms: &'static str, fold: &'static str) -> Item { |
| 26 | | - Item { id, title, page, terms, fold: Some(fold), secondary: false } |
| 34 | + Item { id, title, page, terms, fold: Some(fold), secondary: false, fallback: None } |
| 27 | 35 | } |
| 28 | 36 | |
| 29 | 37 | /// Searchable settings, in result order. |
| @@ -50,7 +58,13 @@ pub const ITEMS: &[Item] = &[ |
| 50 | 58 | item("working-shelf", "Working section (beta)", Page::General, "hide fold running monitoring threads inbox sidebar shelf"), |
| 51 | 59 | item("auto-settle-inactive-threads", "Auto-settle inactive threads", Page::General, "sidebar inactivity days no activity automatically"), |
| 52 | 60 | item("auto-settle-merged-threads", "Auto-settle merged threads", Page::General, "pull request merge closed automatically sidebar"), |
| 53 | | - item("days-before-auto-settle", "Days of inactivity before auto-settle", Page::General, "thread timeout activity sidebar"), |
| 61 | + revealed( |
| 62 | + "days-before-auto-settle", |
| 63 | + "Days of inactivity before auto-settle", |
| 64 | + Page::General, |
| 65 | + "thread timeout activity sidebar", |
| 66 | + "auto-settle-inactive-threads", |
| 67 | + ), |
| 54 | 68 | item("thread-notifications", "Thread notifications", Page::General, "notification sound alert completion input approval desktop"), |
| 55 | 69 | item("in-app-notifications", "In-app notifications", Page::General, "notification toast popup completion input approval failure"), |
| 56 | 70 | item("time-format", "Time format", Page::General, "timestamp clock locale system os 12 hour 24 hour"), |
| @@ -102,8 +116,14 @@ pub const ITEMS: &[Item] = &[ |
| 102 | 116 | item("open-in", "Open in", Page::Integrations, "editor zed vs code cursor vscodium sublime kate file manager"), |
| 103 | 117 | item("source-control", "Source control", Page::SourceControl, "version control git github hosting integrations credentials gh"), |
| 104 | 118 | item("worktree-branch-naming", "Worktree branch naming", Page::SourceControl, "static semantic prefix custom prompt instructions feat fix refactor chore"), |
| 105 | | - item("branch-prefix", "Branch prefix", Page::SourceControl, "worktree branch name prefix vectrum"), |
| 106 | | - item("branch-naming-instructions", "Branch naming instructions", Page::SourceControl, "worktree branch custom prompt model"), |
| 119 | + revealed("branch-prefix", "Branch prefix", Page::SourceControl, "worktree branch name prefix vectrum", "worktree-branch-naming"), |
| 120 | + revealed( |
| 121 | + "branch-naming-instructions", |
| 122 | + "Branch naming instructions", |
| 123 | + Page::SourceControl, |
| 124 | + "worktree branch custom prompt model", |
| 125 | + "worktree-branch-naming", |
| 126 | + ), |
| 107 | 127 | item( |
| 108 | 128 | "connections-environment", |
| 109 | 129 | "This machine", |