implements PLN-0062 native shell lifecycle wiring

This commit is contained in:
2026-05-15 17:53:10 +01:00
parent f62be06dc5
commit edfac5a99b
9 changed files with 156 additions and 55 deletions
@@ -1,6 +1,9 @@
use crate::firmware::firmware_state::{AppCrashesStep, FirmwareState};
use crate::firmware::firmware_state::{AppCrashesStep, FirmwareState, ShellRunningStep};
use crate::firmware::prometeu_context::PrometeuContext;
use prometeu_hal::log::{LogLevel, LogSource};
use prometeu_hal::primitives::Rect;
use prometeu_system::SystemProfileAction;
use prometeu_system::windows::WindowOwner;
#[derive(Debug, Clone)]
pub struct HubHomeStep;
@@ -16,6 +19,18 @@ impl HubHomeStep {
return Some(FirmwareState::AppCrashes(AppCrashesStep { report }));
}
if let Some(SystemProfileAction::LaunchNativeShell(app)) = outcome.action {
let task_id = ctx.os.sessions().create_native_shell_task(app.app_id(), app.title());
let id = ctx.os.windows().add_window(
app.title().to_string(),
WindowOwner::Task(task_id),
Rect { x: 40, y: 20, w: 400, h: 220 },
app.color(),
);
ctx.os.windows().set_focus(id);
return Some(FirmwareState::ShellRunning(ShellRunningStep::new(task_id)));
}
None
}