Skip to content

fix: console iframe cut-off, replay protection, add full screen console view - #51

Merged
bencromwell merged 7 commits into
mainfrom
feat/fixes
Jul 23, 2026
Merged

bencromwell merged 7 commits into
mainfrom
feat/fixes

Conversation

@bencromwell

@bencromwell bencromwell commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes

  • Replay token could be consumed by a missing favicon.ico file, causing premature invalidation and preventing the next action from being possible.
  • Ekosystem UI for Cloud cuts off controls and display of VM console text due to constrained width/flexbox. Workaround this.
  • Cache-busting URL param was hard-coded, replaced with the file's modification time in lieu of a formalised version being available.
  • Update link to docs (broken link #49)

Features

  • Add view full screen option after launch console to make it easier to interact with the VM.

Development

  • Add test runner to Makefile and instructions to Readme for running tests.

When favicon.ico is missing, the 404 is redirected to WHMCS. It
then runs its hooks, which caused us to rotate our replay
protection token. Change the approach to re-issue the token after
the prior one is successfully consumed, and add a test case and
test instruction to the readme and makefile.
@bencromwell
bencromwell requested a review from a team as a code owner July 23, 2026 08:59
@bencromwell

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e0c4f0a2-be24-4f09-ba35-ee73523012da

📥 Commits

Reviewing files that changed from the base of the PR and between 7172d12 and 3cb164d.

📒 Files selected for processing (2)
  • lib/Helpers/Replay.php
  • tests/Helpers/ReplayTest.php
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/Helpers/ReplayTest.php
  • lib/Helpers/Replay.php

📝 Walkthrough

Walkthrough

The PR introduces session-backed replay-token validation with single-use consumption and rotation, alongside comprehensive PHPUnit coverage. Asset cache versions now derive from file modification times. The virtual-machine console gains a fullscreen button. Repository tooling adds Docker-based test execution and PHPStan baseline generation, with corresponding README instructions. CodeRabbit configuration and a server-setup documentation link are also updated.

Estimated code review effort: 3 (Moderate) | ~25 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 13.04% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/fixes

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@lib/Helpers/Replay.php`:
- Around line 50-52: Update the token fallback in the replay helper around the
$token assignment to validate that $_REQUEST['knrp'] is a string before calling
trim(); return false for arrays or any other non-string input. Add a regression
test covering an array-valued knrp request and asserting the helper returns
false.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d94ca465-8498-4fb1-b39e-385c371840d5

📥 Commits

Reviewing files that changed from the base of the PR and between 6386397 and 7172d12.

⛔ Files ignored due to path filters (2)
  • assets/dist/css/client.css is excluded by !**/dist/**
  • assets/dist/js/client.js is excluded by !**/dist/**
📒 Files selected for processing (11)
  • .coderabbit.yaml
  • Makefile
  • README.md
  • composer.json
  • lib/Adaptation/ClientArea/Assets.php
  • lib/Helpers/OverrideHelper.php
  • lib/Helpers/Replay.php
  • lib/ModuleFunction/TestConnection.php
  • phpstan-baseline.neon
  • tests/Helpers/ReplayTest.php
  • views/client/virtual_machines/overview.tpl
💤 Files with no reviewable changes (1)
  • phpstan-baseline.neon

Comment thread lib/Helpers/Replay.php Resolved
@bencromwell
bencromwell merged commit 3e6ecc8 into main Jul 23, 2026
5 checks passed
@bencromwell
bencromwell deleted the feat/fixes branch July 23, 2026 09:49
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.

3 participants