refactor(folio-spec): export login as setup, remove from action pool

Login is deterministic and yields no actions once the app is past the
login screen; sitting at weight 50 in the action pool wasted half of step
picks on a no-op. Promote it to setup so the runner only consults it
while it has work to do, and rebalance remaining weights to round numbers
(addAccount 50, addTxn 40, back 10).
This commit is contained in:
pj committed 2026-04-27 00:24:33 +07:00
1 parent ddb0dc3158
commit e6be1beb22
1 file changed
+7 -5
+7 -5
View File
@@ -175,12 +175,14 @@ export const properties = {
newTxnChangesBalance,
};
export const setup = login;
export const actionsRoot = weighted(
[50, login],
[30, addAccount],
[30, addTxn],
[5, back],
[50, addAccount],
[40, addTxn],
[10, back],
);
(globalThis as { actions?: unknown; properties?: unknown }).actions = actionsRoot;
(globalThis as { actions?: unknown; properties?: unknown; setup?: unknown }).actions = actionsRoot;
(globalThis as { properties?: unknown }).properties = properties;
(globalThis as { setup?: unknown }).setup = setup;