feat: Add sidebar filtering and fix layout issues

Connect sidebar project/tag clicks to filter the task table.
App now observes FilterState changes and triggers task reload.
Removed redundant observer from TaskTable since App handles it.

Fix Panel component that was overwriting its own styles, breaking flex layouts.
Sidebar sections now split space equally and scroll properly.
This commit is contained in:
Ignacio Perez
2025-12-27 13:05:21 -03:00
parent d132e51da2
commit 45d1036fa7
4 changed files with 40 additions and 64 deletions
+17 -3
View File
@@ -55,6 +55,13 @@ impl gpui::Render for App {
}
impl App {
fn reload_tasks(&mut self, cx: &mut gpui::Context<Self>) {
let task_service = &mut self.task_service;
self.task_table.update(cx, |table, cx| {
table.reload_tasks(task_service, cx);
});
}
pub fn run() -> () {
let app = gpui::Application::new();
@@ -102,13 +109,20 @@ impl App {
table.reload_tasks(&mut task_service, cx);
});
App {
let app = App {
sidebar,
filter_state,
filter_state: filter_state.clone(),
status_bar,
task_table,
task_service,
}
};
cx.observe(&filter_state, |app, _, cx| {
app.reload_tasks(cx);
})
.detach();
app
})
},
)