forked from 1b-agent/fieldcraft-upstream
Remove the SETUP card: the browser tree shows the progress
The setup checklist card (#265), its show_setup view setting, the View menu checkbox and the preferences file that only remembered it go; the tree's marks and ghost rows replace them. Session::progress and model.check's progress stay for agents. An old prefs.json is no longer read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
f5a84f5f74
commit
012119e2c2
8 files changed
+3
-239
No files matched your search
@@ -42,7 +42,6 @@ pub mod results;
|
||||
pub mod results_panel;
|
||||
pub mod scene;
|
||||
pub mod selection;
|
||||
pub mod setup;
|
||||
pub mod theme;
|
||||
pub mod timeline;
|
||||
pub mod titlebar;
|
||||
@@ -88,8 +87,6 @@ pub struct UiState {
|
||||
pub show_tree: bool,
|
||||
/// The journal timeline (bottom).
|
||||
pub show_timeline: bool,
|
||||
/// The setup checklist at the top of the browser (remembered per user).
|
||||
pub show_setup: bool,
|
||||
/// The workspace shown, and its toolbar tab.
|
||||
pub workspace: Workspace,
|
||||
pub tab: Tab,
|
||||
@@ -113,7 +110,6 @@ impl Default for UiState {
|
||||
dark: true,
|
||||
show_tree: true,
|
||||
show_timeline: true,
|
||||
show_setup: true,
|
||||
workspace: Workspace::default(),
|
||||
tab: Tab::default(),
|
||||
palette: false,
|
||||
@@ -356,8 +352,7 @@ pub struct ModelApp {
|
||||
/// Recently opened and saved files.
|
||||
pub recent: files::Recent,
|
||||
/// The user's preferences as last saved.
|
||||
prefs: files::Prefs,
|
||||
/// The setup checklist and what it was worked out for.
|
||||
/// The setup progress the browser marks, and what it was worked out for.
|
||||
setup: (Option<(u64, u64, bool, bool)>, std::sync::Arc<Vec<fieldcraft_engine::progress::StageState>>),
|
||||
/// The file opening in the background, and files waiting to open after it.
|
||||
pub loading: Option<files::Loading>,
|
||||
@@ -436,7 +431,6 @@ impl ModelApp {
|
||||
quit_requested: false,
|
||||
services: files::Services::default(),
|
||||
recent: files::Recent::default(),
|
||||
prefs: files::Prefs::default(),
|
||||
setup: (None, std::sync::Arc::default()),
|
||||
loading: None,
|
||||
queued: std::collections::VecDeque::new(),
|
||||
@@ -469,8 +463,6 @@ impl ModelApp {
|
||||
/// Use the host's services (file pickers, the recent-files file) and load the recent list.
|
||||
pub fn with_services(mut self, services: files::Services) -> Self {
|
||||
self.recent = files::Recent::load(services.recent_path.clone());
|
||||
self.prefs = files::Prefs::load(services.prefs_path.as_deref());
|
||||
self.ui.show_setup = self.prefs.show_setup;
|
||||
self.services = services;
|
||||
self
|
||||
}
|
||||
@@ -1327,7 +1319,6 @@ impl ModelApp {
|
||||
browser::browser(self, ui);
|
||||
}
|
||||
context::panel(self, ui);
|
||||
self.save_prefs();
|
||||
egui::CentralPanel::default().frame(egui::Frame::NONE).show(ui, |ui| viewport::show(self, ui));
|
||||
palette::popup(self, ui.ctx());
|
||||
files::show(self, ui.ctx());
|
||||
@@ -1336,8 +1327,8 @@ impl ModelApp {
|
||||
}
|
||||
}
|
||||
|
||||
/// The setup checklist ([`fieldcraft_engine::progress`]), worked out again only when the model
|
||||
/// or its results change.
|
||||
/// The setup progress ([`fieldcraft_engine::progress`]) the browser marks, worked out again
|
||||
/// only when the model or its results change.
|
||||
pub fn setup_stages(&mut self) -> std::sync::Arc<Vec<fieldcraft_engine::progress::StageState>> {
|
||||
use fieldcraft_engine::requirement::Requirement;
|
||||
let key = (self.revision, self.session.revision(), Requirement::Result.met(&self.session), Requirement::ResultsShown.met(&self.session));
|
||||
@@ -1347,14 +1338,6 @@ impl ModelApp {
|
||||
self.setup.1.clone()
|
||||
}
|
||||
|
||||
/// Save the preferences the window changed (a View menu toggle, `ui.set`).
|
||||
pub(crate) fn save_prefs(&mut self) {
|
||||
if self.ui.show_setup != self.prefs.show_setup {
|
||||
self.prefs.show_setup = self.ui.show_setup;
|
||||
self.prefs.save(self.services.prefs_path.as_deref());
|
||||
}
|
||||
}
|
||||
|
||||
/// Remember where a region of the window was drawn (`ui.inspect`'s `layout`).
|
||||
pub fn place(&mut self, region: &'static str, rect: egui::Rect) {
|
||||
self.layout.insert(region, rect);
|
||||
|
||||
Reference in new issue
Block a user