Skip to content

Commit 48c2fa8

Browse files
committed
Fix account auth pages unavailable message - PR_26167_174-account-auth-page-unavailable-message
1 parent 45978b2 commit 48c2fa8

43 files changed

Lines changed: 4645 additions & 313 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

account/create-account.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ <h2>Create Account</h2>
3535
<label for="createAccountPassword">Password</label>
3636
<input id="createAccountPassword" name="password" type="password" autocomplete="new-password" data-account-auth-password>
3737
<button class="btn primary" type="submit" data-account-auth-submit>Create Account</button>
38-
<div class="status" role="status" data-account-auth-status>Checking account availability.</div>
38+
<div class="status" role="status" data-account-auth-status>Create Account is not available in this preview. Please try again later.</div>
3939
</form>
4040
<div class="action-group">
4141
<a class="btn btn--compact" href="sign-in.html">Back to Sign In</a>

account/password-reset.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h2>Password Reset</h2>
3333
<label for="passwordResetEmail">Email</label>
3434
<input id="passwordResetEmail" name="email" type="email" autocomplete="email" data-account-auth-email>
3535
<button class="btn primary" type="submit" data-account-auth-submit>Request Password Reset</button>
36-
<div class="status" role="status" data-account-auth-status>Checking account availability.</div>
36+
<div class="status" role="status" data-account-auth-status>Password Reset is not available in this preview. Please try again later.</div>
3737
</form>
3838
<div class="action-group">
3939
<a class="btn btn--compact" href="sign-in.html">Back to Sign In</a>

account/sign-in.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ <h2>Welcome Back</h2>
3838
<a class="btn" href="create-account.html" data-login-create-account>Create Account</a>
3939
<a class="btn btn--compact" href="password-reset.html" data-login-lost-password>Password Reset</a>
4040
</div>
41-
<div class="status" role="status" data-login-status>Checking account availability.</div>
41+
<div class="status" role="status" data-login-status>Sign In is not available in this preview. You can continue browsing.</div>
4242
</form>
4343
<div class="action-group">
4444
<a class="btn btn--compact" href="toolbox/index.html" data-login-continue>Continue Browsing</a>

assets/theme-v2/js/account-auth-actions.js

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ const action = form?.getAttribute("data-account-auth-form") || "";
77
const ACCOUNT_IDENTITY_SETUP_MESSAGE = "Account identity setup is incomplete. Please contact support.";
88
const AUTH_UNAVAILABLE_MESSAGE = "The site is currently unavailable. Please try again later.";
99
const PASSWORD_RESET_RATE_LIMIT_MESSAGE = "Too many reset requests. Please wait and try again later.";
10+
const CREATE_ACCOUNT_PLACEHOLDER_MESSAGE = "Create Account is not available in this preview. Please try again later.";
11+
const PASSWORD_RESET_PLACEHOLDER_MESSAGE = "Password Reset is not available in this preview. Please try again later.";
1012
let authStatus = null;
1113

1214
function setStatus(message) {
@@ -54,15 +56,21 @@ async function requestAccountAuth(path, options = {}) {
5456
return readJson(response, AUTH_UNAVAILABLE_MESSAGE);
5557
}
5658

57-
function unavailableMessage(status) {
58-
return status?.message || AUTH_UNAVAILABLE_MESSAGE;
59+
function unavailableStatusMessage() {
60+
if (action === "create-account") {
61+
return CREATE_ACCOUNT_PLACEHOLDER_MESSAGE;
62+
}
63+
if (action === "password-reset") {
64+
return PASSWORD_RESET_PLACEHOLDER_MESSAGE;
65+
}
66+
return "Account action is not available in this preview. Please try again later.";
5967
}
6068

6169
async function refreshAccountAuthStatus() {
6270
if (isStaticOnlyLocalEntrypoint()) {
6371
authStatus = {
6472
ready: false,
65-
message: AUTH_UNAVAILABLE_MESSAGE,
73+
message: unavailableStatusMessage(),
6674
};
6775
setFormEnabled(false);
6876
setStatus(authStatus.message);
@@ -71,11 +79,11 @@ async function refreshAccountAuthStatus() {
7179
try {
7280
authStatus = await requestAccountAuth("status");
7381
setFormEnabled(Boolean(authStatus.ready));
74-
setStatus(authStatus.ready ? "Account service is available." : unavailableMessage(authStatus));
75-
} catch (error) {
82+
setStatus(authStatus.ready ? "Account service is available." : unavailableStatusMessage());
83+
} catch {
7684
authStatus = {
7785
ready: false,
78-
message: error instanceof Error ? error.message : AUTH_UNAVAILABLE_MESSAGE,
86+
message: unavailableStatusMessage(),
7987
};
8088
setFormEnabled(false);
8189
setStatus(authStatus.message);
@@ -98,7 +106,7 @@ form?.addEventListener("submit", (event) => {
98106
Promise.resolve(authStatus || refreshAccountAuthStatus())
99107
.then((status) => {
100108
if (!status?.ready) {
101-
setStatus(unavailableMessage(status));
109+
setStatus(unavailableStatusMessage());
102110
return null;
103111
}
104112
const endpoint = actionEndpoint();

assets/theme-v2/js/login-session.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const statusField = document.querySelector("[data-login-status]");
66
const submitButton = document.querySelector("[data-login-submit]");
77
const ACCOUNT_IDENTITY_SETUP_MESSAGE = "Account identity setup is incomplete. Please contact support.";
88
const AUTH_UNAVAILABLE_MESSAGE = "The site is currently unavailable. Please try again later.";
9+
const SIGN_IN_PLACEHOLDER_MESSAGE = "Sign In is not available in this preview. You can continue browsing.";
910
let authStatus = null;
1011

1112
function rootPrefix() {
@@ -91,15 +92,15 @@ async function requestCurrentSession() {
9192
return readJson(response, AUTH_UNAVAILABLE_MESSAGE);
9293
}
9394

94-
function unavailableMessage(status) {
95-
return status?.message || AUTH_UNAVAILABLE_MESSAGE;
95+
function unavailableStatusMessage() {
96+
return SIGN_IN_PLACEHOLDER_MESSAGE;
9697
}
9798

9899
async function refreshAccountAuthStatus() {
99100
if (isStaticOnlyLocalEntrypoint()) {
100101
authStatus = {
101102
ready: false,
102-
message: AUTH_UNAVAILABLE_MESSAGE,
103+
message: SIGN_IN_PLACEHOLDER_MESSAGE,
103104
};
104105
setFormEnabled(false);
105106
setStatus(authStatus.message);
@@ -116,11 +117,11 @@ async function refreshAccountAuthStatus() {
116117
}
117118
}
118119
setFormEnabled(Boolean(authStatus.ready));
119-
setStatus(authStatus.ready ? "Account service is available." : unavailableMessage(authStatus));
120-
} catch (error) {
120+
setStatus(authStatus.ready ? "Account service is available." : unavailableStatusMessage());
121+
} catch {
121122
authStatus = {
122123
ready: false,
123-
message: error instanceof Error ? error.message : AUTH_UNAVAILABLE_MESSAGE,
124+
message: SIGN_IN_PLACEHOLDER_MESSAGE,
124125
};
125126
setFormEnabled(false);
126127
setStatus(authStatus.message);
@@ -137,7 +138,7 @@ form?.addEventListener("submit", (event) => {
137138
Promise.resolve(refreshAccountAuthStatus())
138139
.then((status) => {
139140
if (!status?.ready) {
140-
setStatus(unavailableMessage(status));
141+
setStatus(unavailableStatusMessage());
141142
return null;
142143
}
143144
return requestAccountAuth("sign-in", {

docs_build/dev/codex_commands.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,3 +1696,37 @@ Required reports:
16961696
- `docs_build/dev/reports/PR_26166_175-dev-admin-bootstrap-password-reset_report.md`
16971697
- `docs_build/dev/reports/codex_changed_files.txt`
16981698
- `docs_build/dev/reports/codex_review.diff`
1699+
1700+
1701+
## PR_26167_174-account-auth-page-unavailable-message
1702+
1703+
Changes:
1704+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
1705+
- Verified the current branch is `main` before edits.
1706+
- Investigated Sign In, Create Account, Password Reset, and legacy Lost Password account page flows.
1707+
- Replaced page-load/static-preview account auth status copy with scoped production-safe placeholders.
1708+
- Preserved the generic unavailable message for real provider/network action failures.
1709+
- Updated focused Playwright coverage for account auth placeholder and provider-failure behavior.
1710+
- Did not add inline script/style/event handlers, fake login, browser-owned auth/provider logic, silent fallbacks, hidden defaults, password tables, secrets, or `.env.local` changes.
1711+
1712+
Validation:
1713+
- `node --check assets/theme-v2/js/login-session.js`
1714+
- `node --check assets/theme-v2/js/account-auth-actions.js`
1715+
- `node --check tests/playwright/tools/LoginSessionMode.spec.mjs`
1716+
- `node --check tests/playwright/tools/StaticOnlyLoginApiRequired.spec.mjs`
1717+
- HTML restriction scan for changed/inspected account auth HTML files.
1718+
- `npx playwright test --config=playwright.config.cjs --project=playwright tests/playwright/tools/StaticOnlyLoginApiRequired.spec.mjs tests/playwright/tools/LoginSessionMode.spec.mjs -g "static sign-in page renders|Sign-in page uses|Configured account auth actions|Create Account shows generic provider failure|Password Reset maps upstream rate limit"`
1719+
- Manual browser page-load validation for `/account/sign-in.html`, `/account/create-account.html`, and `/account/password-reset.html`.
1720+
- `npm run test:workspace-v2`
1721+
- `git diff --check`
1722+
- Full samples smoke skipped by request and because samples were not in scope.
1723+
1724+
Required reports:
1725+
- `docs_build/dev/reports/PR_26167_174-account-auth-page-unavailable-message.md`
1726+
- `docs_build/dev/reports/playwright_v8_coverage_report.txt`
1727+
- `docs_build/dev/reports/coverage_changed_js_guardrail.txt`
1728+
- `docs_build/dev/reports/codex_changed_files.txt`
1729+
- `docs_build/dev/reports/codex_review.diff`
1730+
1731+
Packaging:
1732+
- `tmp/PR_26167_174-account-auth-page-unavailable-message_delta.zip`

docs_build/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Report blocked DEV admin bootstrap - PR_26166_175-dev-admin-bootstrap-password-reset
1+
Fix account auth page unavailable message - PR_26167_174-account-auth-page-unavailable-message
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# PR_26167_174-account-auth-page-unavailable-message
2+
3+
## Summary
4+
- Replaced the page-load/static-preview account auth status copy with scoped production-safe placeholders for Sign In, Create Account, and Password Reset.
5+
- Preserved the generic unavailable message for real account action provider/network failures.
6+
- Kept account auth owned by the existing server API paths with no fake login, browser-owned provider selection, hidden defaults, or silent fallback.
7+
- Updated focused Playwright expectations for the account auth pages and preserved provider-failure coverage.
8+
9+
## Branch Validation
10+
- PASS - Current branch was `main` before edits and before packaging validation.
11+
12+
## Requirement Checklist
13+
- PASS - Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before edits.
14+
- PASS - Hard-stopped branch check passed on `main`.
15+
- PASS - Investigated Sign In, Create Account, Password Reset, and legacy Lost Password page flow.
16+
- PASS - Fixed visible page-load copy for `The site is currently unavailable. Please try again later.` on the affected account pages.
17+
- PASS - Kept production-safe placeholders for Create Account and Password Reset/Lost Password recovery paths.
18+
- PASS - Did not add inline script, inline style, style blocks, or inline event handlers.
19+
- PASS - Did not introduce fake login, browser-owned auth/provider logic, silent fallback, or hidden defaults.
20+
- PASS - No secrets or `.env.local` changes.
21+
- PASS - No password tables added.
22+
23+
## Validation Lane Report
24+
- PASS - `node --check assets/theme-v2/js/login-session.js`
25+
- PASS - `node --check assets/theme-v2/js/account-auth-actions.js`
26+
- PASS - `node --check tests/playwright/tools/LoginSessionMode.spec.mjs`
27+
- PASS - `node --check tests/playwright/tools/StaticOnlyLoginApiRequired.spec.mjs`
28+
- PASS - HTML restriction scan for `account/sign-in.html`, `account/create-account.html`, `account/password-reset.html`, and `account/lost-password.html`.
29+
- PASS - Targeted Playwright: `npx playwright test --config=playwright.config.cjs --project=playwright tests/playwright/tools/StaticOnlyLoginApiRequired.spec.mjs tests/playwright/tools/LoginSessionMode.spec.mjs -g "static sign-in page renders|Sign-in page uses|Configured account auth actions|Create Account shows generic provider failure|Password Reset maps upstream rate limit"`
30+
- PASS - Manual browser page-load validation script for `/account/sign-in.html`, `/account/create-account.html`, and `/account/password-reset.html`.
31+
- PASS - `npm run test:workspace-v2`
32+
- PASS - `git diff --check`
33+
- PASS - `npm run codex:review-artifacts`
34+
- SKIPPED - Full samples smoke per request.
35+
36+
## Manual Validation Notes
37+
- `/account/sign-in.html` loaded with `Sign In is not available in this preview. You can continue browsing.`
38+
- `/account/create-account.html` loaded with `Create Account is not available in this preview. Please try again later.`
39+
- `/account/password-reset.html` loaded with `Password Reset is not available in this preview. Please try again later.`
40+
- The generic unavailable text did not appear in the `main` content on those page-load checks.
41+
- `account/lost-password.html` was inspected; it remains a safe legacy navigation page to the current password reset flow and has no auth provider logic.
42+
43+
## Test Data Cleanup
44+
- N/A - This PR did not create or write validation records.
45+
46+
## Reports
47+
- `docs_build/dev/reports/codex_review.diff`
48+
- `docs_build/dev/reports/codex_changed_files.txt`
49+
- `docs_build/dev/reports/playwright_v8_coverage_report.txt`
50+
- `docs_build/dev/reports/coverage_changed_js_guardrail.txt`
51+
52+
## Packaging
53+
- PASS - Created repo-structured delta ZIP at `tmp/PR_26167_174-account-auth-page-unavailable-message_delta.zip`.
54+
- PASS - Delta ZIP contains no `tmp/` entries and no `.env.local` entries.
Lines changed: 86 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,92 @@
11
# git status --short
2-
M docs_build/dev/codex_commands.md
2+
M account/create-account.html
3+
M account/password-reset.html
4+
M account/sign-in.html
5+
M assets/theme-v2/js/account-auth-actions.js
6+
M assets/theme-v2/js/login-session.js
7+
M docs_build/dev/codex_commands.md
38
M docs_build/dev/commit_comment.txt
4-
?? docs_build/dev/reports/PR_26166_175-dev-admin-bootstrap-password-reset_report.md
9+
M docs_build/dev/reports/codex_changed_files.txt
10+
M docs_build/dev/reports/codex_review.diff
11+
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
12+
M docs_build/dev/reports/dependency_gating_report.md
13+
M docs_build/dev/reports/dependency_hydration_reuse_report.md
14+
M docs_build/dev/reports/execution_graph_reuse_report.md
15+
M docs_build/dev/reports/failure_fingerprint_report.md
16+
M docs_build/dev/reports/filesystem_scan_reduction_report.md
17+
M docs_build/dev/reports/incremental_validation_report.md
18+
M docs_build/dev/reports/lane_compilation_report.md
19+
M docs_build/dev/reports/lane_deduplication_report.md
20+
M docs_build/dev/reports/lane_input_validation_report.md
21+
M docs_build/dev/reports/lane_manifests/workspace-contract.json
22+
M docs_build/dev/reports/lane_runtime_optimization_report.md
23+
M docs_build/dev/reports/lane_snapshot_report.md
24+
M docs_build/dev/reports/lane_snapshots/workspace-contract.json
25+
M docs_build/dev/reports/lane_warm_start_report.md
26+
M docs_build/dev/reports/lane_warm_starts/workspace-contract.json
27+
M docs_build/dev/reports/monolith_trigger_removal_report.md
28+
M docs_build/dev/reports/persistent_lane_manifest_report.md
29+
M docs_build/dev/reports/playwright_discovery_ownership_report.md
30+
M docs_build/dev/reports/playwright_discovery_scope_report.md
31+
M docs_build/dev/reports/playwright_structure_audit.md
32+
M docs_build/dev/reports/playwright_v8_coverage_report.txt
33+
M docs_build/dev/reports/retry_suppression_report.md
34+
M docs_build/dev/reports/slow_path_pruning_report.md
35+
M docs_build/dev/reports/static_validation_report.md
36+
M docs_build/dev/reports/targeted_file_manifest_report.md
37+
M docs_build/dev/reports/test_cleanup_performance_report.md
38+
M docs_build/dev/reports/test_cleanup_routing_report.md
39+
M docs_build/dev/reports/testing_lane_execution_report.md
40+
M docs_build/dev/reports/validation_cache_report.md
41+
M docs_build/dev/reports/zero_browser_preflight_report.md
42+
M tests/playwright/tools/LoginSessionMode.spec.mjs
43+
M tests/playwright/tools/StaticOnlyLoginApiRequired.spec.mjs
44+
?? docs_build/dev/reports/PR_26167_174-account-auth-page-unavailable-message.md
545

646
# git ls-files --others --exclude-standard
7-
docs_build/dev/reports/PR_26166_175-dev-admin-bootstrap-password-reset_report.md
47+
docs_build/dev/reports/PR_26167_174-account-auth-page-unavailable-message.md
848

949
# git diff --stat
10-
docs_build/dev/codex_commands.md | 24 ++++++++++++++++++++++++
11-
docs_build/dev/commit_comment.txt | 2 +-
12-
2 files changed, 25 insertions(+), 1 deletion(-)
50+
account/create-account.html | 2 +-
51+
account/password-reset.html | 2 +-
52+
account/sign-in.html | 2 +-
53+
assets/theme-v2/js/account-auth-actions.js | 22 +-
54+
assets/theme-v2/js/login-session.js | 15 +-
55+
docs_build/dev/codex_commands.md | 34 +
56+
docs_build/dev/commit_comment.txt | 2 +-
57+
docs_build/dev/reports/codex_changed_files.txt | 92 +-
58+
docs_build/dev/reports/codex_review.diff | 2800 +++++++++++++++++++-
59+
.../dev/reports/coverage_changed_js_guardrail.txt | 19 +-
60+
docs_build/dev/reports/dependency_gating_report.md | 2 +-
61+
.../reports/dependency_hydration_reuse_report.md | 12 +-
62+
.../dev/reports/execution_graph_reuse_report.md | 16 +-
63+
.../dev/reports/failure_fingerprint_report.md | 2 +-
64+
.../reports/filesystem_scan_reduction_report.md | 2 +-
65+
.../dev/reports/incremental_validation_report.md | 14 +-
66+
docs_build/dev/reports/lane_compilation_report.md | 2 +-
67+
.../dev/reports/lane_deduplication_report.md | 2 +-
68+
.../dev/reports/lane_input_validation_report.md | 2 +-
69+
.../reports/lane_manifests/workspace-contract.json | 10 +-
70+
.../reports/lane_runtime_optimization_report.md | 14 +-
71+
docs_build/dev/reports/lane_snapshot_report.md | 12 +-
72+
.../reports/lane_snapshots/workspace-contract.json | 22 +-
73+
docs_build/dev/reports/lane_warm_start_report.md | 12 +-
74+
.../lane_warm_starts/workspace-contract.json | 16 +-
75+
.../dev/reports/monolith_trigger_removal_report.md | 2 +-
76+
.../dev/reports/persistent_lane_manifest_report.md | 12 +-
77+
.../playwright_discovery_ownership_report.md | 2 +-
78+
.../reports/playwright_discovery_scope_report.md | 2 +-
79+
.../dev/reports/playwright_structure_audit.md | 2 +-
80+
.../dev/reports/playwright_v8_coverage_report.txt | 65 +-
81+
docs_build/dev/reports/retry_suppression_report.md | 2 +-
82+
docs_build/dev/reports/slow_path_pruning_report.md | 18 +-
83+
docs_build/dev/reports/static_validation_report.md | 12 +-
84+
.../dev/reports/targeted_file_manifest_report.md | 8 +-
85+
.../dev/reports/test_cleanup_performance_report.md | 24 +-
86+
.../dev/reports/test_cleanup_routing_report.md | 2 +-
87+
.../dev/reports/testing_lane_execution_report.md | 54 +-
88+
docs_build/dev/reports/validation_cache_report.md | 30 +-
89+
.../dev/reports/zero_browser_preflight_report.md | 10 +-
90+
tests/playwright/tools/LoginSessionMode.spec.mjs | 9 +-
91+
.../tools/StaticOnlyLoginApiRequired.spec.mjs | 3 +-
92+
42 files changed, 3074 insertions(+), 313 deletions(-)

0 commit comments

Comments
 (0)