Skip to content

Add link back to start page on 404 error page (#107) - #321

Open
wakqasahmed wants to merge 1 commit into
Cockpit-HQ:developfrom
wakqasahmed:fix/404-back-to-start-link-107
Open

Add link back to start page on 404 error page (#107)#321
wakqasahmed wants to merge 1 commit into
Cockpit-HQ:developfrom
wakqasahmed:fix/404-back-to-start-link-107

Conversation

@wakqasahmed

@wakqasahmed wakqasahmed commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

What

Adds a link back to the start page (admin dashboard root) on the 404 error page (modules/App/views/errors/404.php).

Why

Closes #107. Currently the 404 page is a dead end — no way to navigate back into the app without manually editing the URL.

Implementation notes

  • Used the $this->route('/') helper for the link target, matching the existing pattern used elsewhere in the codebase for linking to the dashboard/start page (see modules/App/layouts/app.php, e.g. <a href="<?= $this->route('/') ?>" aria-label="<?= t('Dashboard') ?>">). This resolves to the admin dashboard root, which is the correct "start page" target given this view lives under modules/App/views/errors/ (the admin-side error view) — there is no separate public-site 404 template in the codebase.
  • Label uses the file's existing i18n convention: t('Back to start page').
  • No other 404/error views in the repo needed changes; this is the only 404 template.

Testing

  • php -l syntax check passed (PHP 8.3, matching the composer.json "php": "^8.3.0" requirement), via docker run --rm -v $(pwd):/app -w /app php:8.3-cli php -l modules/App/views/errors/404.php.
  • Manual review confirms the added markup follows the existing markup/whitespace conventions in the file.

Summary by CodeRabbit

  • Bug Fixes
    • Added a link on the 404 error page to return to the start page.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c65433a3-8183-460c-9ce8-698cef89a64b

📥 Commits

Reviewing files that changed from the base of the PR and between 69d3238 and 2552265.

📒 Files selected for processing (1)
  • modules/App/views/errors/404.php

Included review availability: Your plan includes up to 4 reviews per rolling hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The 404 error view now includes a paragraph with a link to return to the start page.

Changes

404 error navigation

Layer / File(s) Summary
Add start-page link
modules/App/views/errors/404.php
The 404 view renders a link to the start page.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 25522

This localized change adds a translated link from the 404 page back to the dashboard start page. No actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding a link to the start page on the 404 error page.
Linked Issues check ✅ Passed The change implements issue #107 by adding a translated link back to the start page on the 404 page.
Out of Scope Changes check ✅ Passed The pull request contains only the requested 404-page link change and no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@wakqasahmed

Copy link
Copy Markdown
Contributor Author

Checked for outstanding review feedback on this PR: there are no review threads and no reviews requesting changes — CodeRabbit's only comment states "No actionable comments were generated in the recent review." Nothing to address.

@wakqasahmed

Copy link
Copy Markdown
Contributor Author

Hi @aheinze — noticed this PR doesn't have a reviewer assigned yet — it's been about 4 days, CI is green and it's mergeable. Would you (or whoever's best placed) be able to take a look, or point me to who should? Thanks!

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.

link back to start page on 404 page

1 participant