feat(act): port the ACT engine from jackinabox86's fork (#25 Phase C)#70
Merged
Conversation
Ports the store adapter (_compat), registry, step generator, action/bill logic, and material groups from https://github.com/jackinabox86/APXM — an rprun XIT ACT port (MIT, Dan Pavlides; refined-prun attribution headers kept verbatim). #25 Phase C, commit 1 of 2 (DOM layer follows). Adaptations from the fork: - materials adapter now reads the FIO reference store (stores/reference.ts getById) instead of the fork's WS-derived stores/entities/materials; the engine only consumes ticker/weight/volume, which MaterialInfo carries - add the WarehouseLocation type import _compat was missing (the fork built through the latent tsc error; main gates on tsc --noEmit) - settings.autoConfirm (default false) added for the step machine's post-ACT confirmation gate — opt-in per the action-authorisation rule, Settings toggle UI lands with the Phase D views - dropped port-session breadcrumb comments Tests: ports the fork's stage1 suite and adds compat (seam contract), step-generator (WAR state), and bills (resupply/repair math) suites — 38 tests, materials-adapter case normalization mutation-verified. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Completes the #25 Phase C engine port (commit 2 of 2): prun-css C.* resolver, select-dom globals, mobile buffer navigator, step machine, action runner, and the CXPO_BUY / MTRA_TRANSFER / OPEN_SFC action steps. Deviations from the fork: - waitActionFeedback is gated on settings.autoConfirm (default false): the machine brings the hidden buffer on-screen and waits for the user to tap APEX's CONFIRM themselves, observing the overlay's class transition instead of clicking it. The fork's auto-click survives only behind the opt-in flag, per the action-authorisation rule. - stripped 13 debug console.logs (cont-utils, MTRA_TRANSFER) - ambient $ declaration gains the optional timeoutMs param selectWait actually takes (latent fork tsc error; main gates on tsc --noEmit) Nothing imports the engine at runtime until the Phase D views land — bundle size is unchanged; register-all.test.ts keeps the registration graph executed under vitest meanwhile. Tests: prun-css parsing, CX Buy fillAmount/generateSteps (noBuy, WAR inventory, partial fills), register-all, and the confirmation gate (mutation-verified: forcing auto-click fails both manual-path tests). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
apxm | 4ecf4df | Jul 06 2026, 06:06 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the full ACT engine (~2,600 lines) from jackinabox86's fork — his adaptation of refined-prun's XIT ACT feature (MIT, © 2025 Dan Pavlides; per-file
Ported from refined-prunattribution headers kept verbatim). This is #25 Phase C: the engine lands complete and tested but nothing imports it at runtime — bundle size is unchanged. Phase D wires upBurnActView/RepairActView/ActionRunnerPaneland the Settings UI.Credit to @jackinabox86 for the working port this adopts, including the DOM gotchas and mobile workarounds already baked into it.
Commit 1 — logic core:
_compatstore adapter, act-registry, step generator, CX Buy / MTRA action logic, Resupply / Repair material groups, plussettings.autoConfirm(field only, default false).Commit 2 — DOM layer: prun-css
C.*resolver, select-dom globals, mobile buffer navigator, step machine, action runner, CXPO_BUY / MTRA_TRANSFER / OPEN_SFC action steps.Adaptations from the fork
stores/reference.ts) instead of the fork's WS-derived store — the engine only reads ticker/weight/volume, whichMaterialInfocarries. Phase D should gate run-start onuseMaterialsStore.getState().fetched.waitActionFeedbackis gated onsettings.autoConfirm(default false). The fork auto-clicked APEX's post-ACT confirmation overlay; per the action-authorisation ruling the default now brings the hidden buffer on-screen and waits for the user to tap CONFIRM themselves (observing the overlay's class transition). The auto-click survives only behind the opt-in flag; its Settings toggle ships with Phase D.WarehouseLocationimport; ambient$missing thetimeoutMsparam) — the fork built through them, main gates ontsc --noEmit.console.logs; dropped port-session breadcrumb comments.Testing
_compatseam contract, step-generator WAR state, resupply/repair bill math, CX Buy fill/generateSteps (noBuy, warehouse inventory, partial fills), prun-css parsing, register-all (keeps the unreferenced engine executed under vitest), and the confirmation gate.npx tsc --noEmitclean; Chrome + Firefox builds green; bundle size unchanged (engine tree-shakes until Phase D).Part of #25. Related: #28 (the fork implements it — Phase D), #31 (
_compatis the pure-core/adapter seam).🤖 Generated with Claude Code