HP-2763: Remove unused `ExportAction` and adjust export-related confi…
…gs and methods
Summary by CodeRabbit
-
Bug Fixes
- Improved error handling so exceptions are now propagated instead of being swallowed.
- Adjusted redirect behavior to avoid redirecting to an item view when a delete action occurs.
-
Refactor
- Updated export workflow to use a new "start-export" entry point and streamlined related internal logic.
Walkthrough
Removed the public export action and its import from the base controller; IndexPage now checks start-export. RunProcessAction now logs then rethrows exceptions. ProgressAction property renamed from needsToBeEnd to needToTerminate with inverted loop condition. Several frontend, test, asset, and typing tweaks were added.
Changes
| Cohort / File(s) | Summary |
|---|---|
Exception handling src/actions/RunProcessAction.php |
Catch block now logs the exception and rethrows it; also minor formatting/comment edits. |
Controller: export action removed src/base/Controller.php |
Removed ExportAction import and deleted public 'export' action entry from actions(). |
Index page: export check & rename src/widgets/IndexPage.php |
canShowExport() switched to check 'start-export'; local variable repColFinder renamed to representationCollectionFinder and type-comment updated. |
Progress loop/flag rename src/actions/ProgressAction.php |
Public property needsToBeEnd → needToTerminate; loop condition inverted to use !$this->needToTerminate && .... |
Frontend: audit table changes src/assets/audit/src/app/App.tsx, src/assets/audit/build/mix-manifest.json |
Reworked audit table columns, filtering, sorting, pagination (pageSize 100); updated asset manifest mapping for "/main.js". |
Grid typing change src/grid/ColspanColumn.php |
public $columns typed to public array $columns; default class resolution uses ?? instead of ?:. |
Playwright test helpers tests/playwright/page/Index.ts, tests/playwright/ui/Modal.ts |
clickColumnOnTable() gains optional timeout parameter and passes it to .click(); added new Modal test helper class with methods for open/close, clicks, and field filling. |
Sequence Diagram(s)
sequenceDiagram
participant Caller
participant RunProcessAction
participant Logger
Caller->>RunProcessAction: run(...)
alt completes
RunProcessAction-->>Caller: result
else exception
RunProcessAction->>Logger: log(exception)
RunProcessAction-->>Caller: throw exception
end
sequenceDiagram
participant Trigger
participant ProgressAction
participant LimitChecker
Trigger->>ProgressAction: start(id, data)
loop while running
ProgressAction->>LimitChecker: isLimitHasNotBeenReachedYet(id, data)?
alt limit not reached AND not needToTerminate
ProgressAction-->>Trigger: perform iteration
else terminate
ProgressAction-->>Trigger: exit loop
end
end
Estimated code review effort
🎯 4 (Complex) | ⏱️ ~45 minutes
- Pay attention to callers of RunProcessAction for expected exception handling changes.
- Verify any references to the removed
'export'action elsewhere (routes, widgets, tests) and update accordingly. - Confirm all uses of the renamed
ProgressActionproperty are updated. - Review the large frontend changes in
App.tsxfor filtering/sorting correctness and potential regressions in UI behavior.
Possibly related PRs
- hiqdev/hipanel-core#284 — modifies action-related files including RunProcessAction and ProgressAction; likely coordinated with these changes.
- hiqdev/hipanel-core#326 — updates the same Playwright
clickColumnOnTabletimeout change. - hiqdev/hipanel-core#325 — modifies audit frontend files and mix-manifest; related to the App.tsx and asset changes here.
Suggested reviewers
- hiqsol
- SilverFire
Poem
🐰
I logged the stumble, then let it bound free,
No silent swallow beneath the old tree.
Exports start anew with a clearer name,
A loop that knows when to stop its game.
Hooray — code hops on, bright and breezy!
Pre-merge checks and finishing touches
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | ⚠️ Warning | Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. | You can run @coderabbitai generate docstrings to improve docstring coverage. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The pull request title clearly summarizes the main change: removing an unused ExportAction and adjusting export-related configuration, which aligns with the primary modifications across multiple files. |
✨ Finishing touches
- [ ] 📝 Generate docstrings
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.