refactor(app-iced, presenter): M114 rebase 后守 400 行 —— 四处纯搬移(不动语义、不压注释、不挪断言)
主线六条合入后,四个被我碰过的文件越过 400 行;按模块拆开,只搬不改: - `presenter/host/mod.rs` 421→366:账户刷新/皮肤三段(refresh_accounts / attach_skins / request_skins)搬进 `host/accounts/refresh.rs`(`impl CoreHost`,pub(in crate::host)) - `presenter/state.rs` 410→392:`TileCell` + `grid_positions` 搬进 `state/tiles.rs`, `state.rs` 用 `pub use` 再导出,老路径不变 - `app-iced/app/state.rs` 401→394:账户页重建那一段搬进 `app/view/account_page.rs` 的 `App::rebuild_account_page` - `app-iced/app/update.rs` 407→388:`ULL_START_ROUTE` 取值表搬进 `app/update/boot_env.rs` (纯函数、无状态)
This commit is contained in:
1 parent
0f69eec64d
commit
a183adc072
12 files changed
+210
-120
No files matched your search
@@ -0,0 +1,26 @@
|
||||
//! 启动期的取证环境变量解析(`ULL_START_ROUTE`)。
|
||||
//!
|
||||
//! 从 `app/update.rs` 原样搬出(那个文件在 M105/M106/M109/M113 之后贴着 400 行硬线):
|
||||
//! **纯函数、无状态**,只是取值表长到了七条。
|
||||
|
||||
use unlucky_presenter::router::Route;
|
||||
|
||||
/// 取证开关 `ULL_START_ROUTE` 的取值解析(`settings` / `instances` / `download` / `content` / `logs`)。
|
||||
///
|
||||
/// 为什么是环境变量:`crates/app-iced/src/cli.rs` 不在 M93 的 scope,而外观矩阵必须在**设置页**上
|
||||
/// 出图。语义与 `ULL_APPEARANCE_*` / `ULL_TICK_TRACE` 一致:只影响这一次进程。
|
||||
pub(super) fn env_start_route() -> Option<Route> {
|
||||
match std::env::var("ULL_START_ROUTE").ok()?.trim() {
|
||||
"instances" => Some(Route::Instances),
|
||||
"download" => Some(Route::Download),
|
||||
"logs" => Some(Route::Logs),
|
||||
"settings" => Some(Route::Settings),
|
||||
// M104:AI 独立页也要能直达(三态矩阵的 Detached 那张)
|
||||
"agent" => Some(Route::Agent),
|
||||
// M109:内容库(截图矩阵要能直达;页面内的四条侧栏不在路由里)
|
||||
"content" => Some(Route::Content),
|
||||
// M114:账户页的 D30 矩阵要能直达(`cli.rs` 不在本 mission 的 scope)
|
||||
"accounts" => Some(Route::Accounts),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user