Skip to content

Conversation

@mpscholten
Copy link
Member

Summary

  • Moves ActionType from controller context to WAI request vault
  • isActiveController now works with just ?request instead of requiring ?context
  • Creates new IHP.ActionType module with cleaner API

Changes

  • New IHP.ActionType module: Contains ActionType, setActionType, requestActionType, and isActiveController
  • IHP.RouterSupport: Inserts ActionType into vault via setActionType in runAction'
  • IHP.ViewSupport: Re-exports isActiveController from ActionType for backward compatibility
  • IHP.ControllerSupport: Removes putContext call for ActionType (no longer needed)
  • IHP.Controller.Context: Re-exports ActionType from the new module

Test plan

  • All 345 existing tests pass
  • Type checks all modified modules

🤖 Generated with Claude Code

mpscholten and others added 3 commits January 25, 2026 13:39
This allows `isActiveController` to work with just `?request` instead
of requiring `?context`, making it usable in more contexts.

- Add new IHP.ActionType module with ActionType, setActionType, and
  isActiveController
- Store ActionType in WAI request vault in runAction' before creating
  controller context
- Remove ActionType from controller context (no longer needed there)
- Re-export isActiveController from ViewSupport for backward
  compatibility
- Add wai-request-params to .ghci for test environment

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Updates view helpers to use ?request.frameworkConfig instead of
?context.frameworkConfig, since frameworkConfig is already in the
request vault.

Functions updated:
- theCSSFramework
- fromCSSFramework
- liveReloadWebsocketUrl
- renderFlashMessages / theFlashMessages
- renderBreadcrumb
- createFormContext / formFor'

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The renderBreadcrumb function now requires ?request instead of ?context.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@mpscholten mpscholten merged commit 8dc83ba into master Jan 25, 2026
1 check passed
@mpscholten mpscholten deleted the action-type-vault branch January 25, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants