{"record":{"id":"15e71be450e6bb37","repo":"gitbutlerapp/gitbutler","slug":"no-searchable-columns","errorCode":null,"errorMessage":"no searchable columns","messagePattern":"no searchable columns","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"crates/but/src/command/legacy/status/tui/fuzzy_picker.rs","lineNumber":118,"sourceCode":"        let input_height: u16 = 1;\n\n        let col_widths = self\n            .items\n            .iter()\n            .map(|item| item.columns(SearchableToken(())))\n            .map(|cols| {\n                cols.into_iter()\n                    .map(|col| col.text.width())\n                    .collect::<Vec<_>>()\n            })\n            .collect::<Vec<_>>();\n\n        // assume the searchable column is at the same index on every row\n        let searchable_col_idx = self.items[0]\n            .columns(SearchableToken(()))\n            .into_iter()\n            .position(|col| col.searchable.is_some())\n            .expect(\"no searchable columns\");\n\n        // assume each row contains the same number of columns\n        let num_cols = col_widths[0].len();\n\n        let column_spacing = 2;\n\n        let mut col_constraints = (0..num_cols)\n            .map(|n| col_widths.iter().map(|c| &c[n]).collect::<Vec<_>>())\n            .map(|col| col.iter().copied().max().unwrap())\n            .map(|&width| Constraint::Length(width as u16))\n            .collect::<Vec<_>>();\n        for (i, constraint) in col_constraints.iter_mut().enumerate() {\n            if i == searchable_col_idx {\n                *constraint = Constraint::Min(1);\n                break;\n            }\n        }\n","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/crates/but/src/command/legacy/status/tui/fuzzy_picker.rs#L100-L136","documentation":"A developer panic in the fuzzy picker renderer: `render` assumes every item row exposes at least one searchable column and calls `.expect(\"no searchable columns\")` on the first row's column metadata. If the item type's `columns(SearchableToken(()))` implementation returns no column with `searchable.is_some()`, the picker cannot filter and panics.","triggerScenarios":"Opening/refreshing the fuzzy picker with an item list whose `SearchableToken` column implementation defines no searchable column — typically after adding a new picker item type or modifying an existing `columns()` impl and forgetting to mark a column searchable.","commonSituations":"A newly added picker mode (e.g. new command or branch list) whose column definitions omit `searchable: Some(...)`; a refactor that changed column ordering or dropped the searchable marker; empty/placeholder items with zero columns.","solutions":["Fix the item's `columns(SearchableToken(()))` implementation so at least one column returns `searchable: Some(...)`.","Add a unit test asserting every picker item type yields a searchable column.","Check recent changes to the specific picker's item struct — this panic appears immediately after such edits.","As a hardening measure, validate the items list when constructing the picker instead of panicking during render."],"exampleFix":"// before\nimpl TableData for MyItem {\n    fn columns(&self, _: SearchableToken(())) -> impl IntoIterator<Item = Column<MyItem, ()>> {\n        [Column::new(\"Name\", self.name.clone())] // no searchable marker\n    }\n}\n// after\n[Column::new(\"Name\", self.name.clone()).searchable(|item| item.name.clone())]","handlingStrategy":"validation","validationCode":"fn validate_searchable<T: TableData>(items: &[T]) -> bool {\n    items.first().map_or(true, |it| {\n        it.columns(SearchableToken(())).into_iter().any(|c| c.searchable.is_some())\n    })\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always mark at least one column searchable in every picker item's `columns()` impl.","Add a unit test that every picker item type yields a searchable column.","Validate the picker configuration at construction time, not during render."],"tags":["tui","panic","invariant","picker"],"backgroundTag":"internal-invariant-violation","analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}