Skip to content

fix(view): welcome page no longer shows "Wheels - Error" browser title (#3175) - #3187

Closed
wheels-bot[bot] wants to merge 1 commit into
developfrom
fix/bot-3175-fresh-install-welcome-page-browser-title-is-wheels
Closed

fix(view): welcome page no longer shows "Wheels - Error" browser title (#3175)#3187
wheels-bot[bot] wants to merge 1 commit into
developfrom
fix/bot-3175-fresh-install-welcome-page-browser-title-is-wheels

Conversation

@wheels-bot

@wheels-bot wheels-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

The shared _header_simple.cfm partial hardcoded <title>Wheels - Error</title>. That partial is included by both the error page (EventMethods.$runOnError, where the error title is correct) and the fresh-install welcome page (congratulations.cfm, where it is wrong) — so every successful first boot rendered a browser tab titled Error. This parameterizes the title: the partial now defaults its <title> to Wheels, and the error handler sets request.wheels.pageTitle = "Wheels - Error" before including the partial so error screens keep their error-specific title.

Note on triage accuracy: the triage comment stated congratulations.cfm was the only consumer of the partial. That is not correct — EventMethods.cfc:104 also includes it for the error page. A flat hardcode swap to Wheels would therefore have broken the error-page title, which is why the title is parameterized (default + request-scoped override) rather than simply replaced.

Related Issue

Fixes #3175

Type of Change

  • Bug fix

Feature Completeness Checklist

  • DCO sign-off — commit carries Signed-off-by: claude[bot] (git commit -s)
  • Testsvendor/wheels/tests/specs/view/HeaderSimpleTitleSpec.cfc renders the partial via $includeAndReturnOutput and asserts the welcome-page default <title> is Wheels (and is not Wheels - Error), plus that a request.wheels.pageTitle override is honoured so error screens keep Wheels - Error
  • Framework Docs — left to bot-update-docs.yml
  • AI Reference Docs — left to bot-update-docs.yml
  • CLAUDE.md — left to bot-update-docs.yml
  • Changelog fragmentchangelog.d/3175-header-simple-welcome-title.fixed.md
  • Test runner passescould not be run locally. The wheels CLI binary is not installed in this bot environment: tools/test-local.sh aborts at server start with nohup: failed to run command 'wheels': No such file or directory, and the sandbox confines filesystem access to the repo working tree, so the runner could not be installed or located. Verification is delegated to CI — bot-tdd-gate enforces the spec+implementation diff, and the compat-matrix runs the actual TestBox suite across engines. The spec is failing-by-construction against the previous hardcoded Wheels - Error title and passes against this change.

Test Plan

  1. Boot a fresh 4.0.x app and load the homepage — the browser tab now reads Wheels (previously Wheels - Error).
  2. Trigger a framework error rendered as HTML — the error screen tab still reads Wheels - Error.
  3. HeaderSimpleTitleSpec.cfc exercises both paths headlessly via the framework test object.

#3175)

The shared _header_simple.cfm partial hardcoded <title>Wheels - Error</title>, but it is included by both the error page (EventMethods.$runOnError, where that title is correct) and the fresh-install welcome page (congratulations.cfm, where it is wrong). Parameterize the title: default it to "Wheels" and have the error handler set request.wheels.pageTitle = "Wheels - Error" before including the partial. Every successful first boot now renders a tab titled "Wheels" instead of "Error".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
@wheels-bot

wheels-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Wheels Bot — No doc updates

Reviewed this PR's diff and found no docs that need updating (purely internal bug fix — corrects a hardcoded <title> in the framework's own view chrome; no public API, user-visible feature surface, CLI command, or documented convention changed).

@wheels-bot wheels-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Wheels Bot — Reviewer

TL;DR: This PR fixes #3175 — the fresh-install welcome page rendered a browser tab titled Wheels - Error because the shared _header_simple.cfm partial hardcoded that title. The fix parameterizes the title (default Wheels, request-scoped override) and correctly preserves the error-page title via request.wheels.pageTitle in EventMethods.$runOnError. The change is correct, well-tested, and cross-engine safe. Verdict: comment — no blocking findings; one minor commit-message nit below.

What was verified

  • Consumer completenessgit grep _header_simple confirms exactly two render-time consumers: vendor/wheels/public/views/congratulations.cfm:6 (gets the new Wheels default) and vendor/wheels/events/EventMethods.cfc:110 (gets the Wheels - Error override set at line 107, before the include). The PR body's correction of the triage comment is accurate.
  • No key collisionrequest.wheels.pageTitle is written nowhere else in the framework; the only reader is the new block in _header_simple.cfm:42-49.
  • Guard asymmetry is mootEventMethods.cfc:106 skips the override when request.wheels is missing/non-struct, which would theoretically leave an error page titled Wheels; but the very next pre-existing line (EventMethods.cfc:109) dereferences request.wheels unconditionally, so no such request reaches the header include anyway.
  • Failing-by-construction — against the old hardcoded <title>Wheels - Error</title>, the spec's expect(html).toInclude("<title>Wheels</title>") fails (the old string does not contain that substring), so HeaderSimpleTitleSpec.cfc genuinely pins the regression.
  • Cross-engine — the spec's semicolon-less arrow-function style matches 10+ existing view specs (e.g. guidesRedirectHeadSpec.cfc); the finally block contains only a StructDelete call (safe per Cross-Engine Invariant 12 — only loops in finally miscompile on Lucee 7); no local.X writes inside a catch (Invariant 11); EncodeForHTML is available on every supported engine. Rendering framework partials via application.wo.$includeAndReturnOutput in specs has prior art (debugBarEncodingSpec.cfc:39).
  • In-suite side effect is inert — rendering the partial sets request.wheels.showDebugInformation = true (_header_simple.cfm:11, pre-existing). This cannot corrupt suite output: vendor/wheels/events/init/debugging.cfm forces showDebugInformation off outside development, and the JSON/TXT/JUnit result renderers each re-set the request flag to false (public/tests/json.cfm:12, txt.cfm:9, junit.cfm:8).
  • XSS — the new #EncodeForHTML(local.simpleHeaderTitle)# output encoding is a strict hardening improvement over the previous static literal.
  • Changelog — fragment present at changelog.d/3175-header-simple-welcome-title.fixed.md with a valid fixed type; no direct CHANGELOG.md edit. ✓

Commits

  • Nit (non-blocking): the commit body of ce83a278b is a single ~500-character line. commitlint.config.js extends @commitlint/config-conventional, which carries body-max-line-length: [2, 'always', 100], and CLAUDE.md § Commit Message Conventions documents "body lines ≤ 100 chars". The enforced CI gate (pr.yml commitlint job) only lints the PR title — which passes (fix(view): …, valid type, ≤ 100 chars) — and recently merged commits (e.g. the Dependabot bump c94be0500) also carry >100-char body lines, so this does not block. For future bot commits, wrap body paragraphs at 100 columns.

Tests

  • Optional hardening (non-blocking): the first spec in HeaderSimpleTitleSpec.cfc deletes request.wheels.pageTitle as setup but never restores a pre-existing value. Today nothing else in the framework writes that key outside error handling, so there is no observable leak — but mirroring the second spec's try/finally snapshot-and-restore would make the spec order-independent against future writers. Take it or leave it.

No Correctness, Cross-engine, or Security findings. Docs deferral to bot-update-docs.yml is appropriate for a framework-internal title fix, and the feature-completeness checklist is filled honestly (the local-runner limitation is disclosed rather than checked off).

@bpamiri

bpamiri commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Superseded by #3195 (merged): a propose-fix draft that raced the ForgeBox path-repair campaign for the same issue; the campaign PR landed first and closed the underlying issue. Closing the duplicate.

@bpamiri bpamiri closed this Jun 13, 2026
@bpamiri
bpamiri deleted the fix/bot-3175-fresh-install-welcome-page-browser-title-is-wheels branch June 13, 2026 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fresh-install welcome page browser title is "Wheels - Error" — _header_simple.cfm hardcodes the error-page title

1 participant