Skip to content

fix: Chrome review bug fix batch - #38

Merged
timh8127 merged 9 commits into
mainfrom
fix/chrome-review-bugs
Jul 2, 2026
Merged

fix: Chrome review bug fix batch#38
timh8127 merged 9 commits into
mainfrom
fix/chrome-review-bugs

Conversation

@timh8127

@timh8127 timh8127 commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes all six confirmed bugs from the Claude Chrome review (see wsist-task.md):

  1. SEO — explicit <PageTitle> on landing/privacy/terms pages plus <meta description>, Open Graph and Twitter card tags on the landing page (previously localizer-built/empty titles, no meta tags).
  2. Add test modal — removed the leftover "Some Test" development pre-fill from OpenAddTestModal().
  3. Study card "Because" text — verified the grade line logic is correct; added a comment clarifying it represents the grade pull scoring factor (+2/+4/+6, matching PriorityCalculator.CalculateGradeScore).
  4. Grade input — added placeholder="1.0 – 6.0" so the Swiss grade scale is visible.
  5. Privacy policy §6 — now mentions the self-service Settings → Delete account option (EN + DE) instead of only the privacy@wsist.ch contact route.
  6. Empty state UX — added a "+ Add test" button directly in the "No upcoming tests" empty state.

One commit per task, in task order.

Test plan

  • dotnet test — 35/35 passing before every commit
  • dotnet csharpier format . — clean before every commit
  • Full solution build (dotnet build) — 0 errors

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a visible Add Test button on the home page when no upcoming tests are shown.
    • Enhanced login page sharing/SEO with explicit preview meta tags.
  • Bug Fixes

    • Made the add/edit test title field required for better form validation.
    • Updated the grade input hint to reflect the expected 1.0–6.0 range.
    • Reset the default new-test title to start blank.
  • Documentation

    • Updated Privacy Policy text to include in-app account/data deletion and a 30-day deletion timeframe.
    • Updated Privacy and Terms page titles.

timh8127 and others added 6 commits July 1, 2026 21:57
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…deletion

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@DG-TimHug, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 461aba0f-a604-4535-9ff6-f6c47e35bcd1

📥 Commits

Reviewing files that changed from the base of the PR and between 11ebc8f and 8a1749e.

⛔ Files ignored due to path filters (1)
  • WSIST/WSIST.Web/wwwroot/og-image.png is excluded by !**/*.png
📒 Files selected for processing (5)
  • WSIST/WSIST.Web/Components/Pages/Home.razor
  • WSIST/WSIST.Web/Components/Pages/Home.razor.cs
  • WSIST/WSIST.Web/Components/Pages/Login.razor
  • WSIST/WSIST.Web/Resources/SharedResource.de.resx
  • WSIST/WSIST.Web/Resources/SharedResource.resx
📝 Walkthrough

Walkthrough

This PR updates the Home add-test flow, replaces localized page titles with fixed titles, adds Login SEO metadata, revises privacy policy retention text in English and German, and adds comments in Study.razor.cs.

Changes

Home Add-Test Modal Improvements

Layer / File(s) Summary
Empty state and modal defaults
WSIST/WSIST.Web/Components/Pages/Home.razor, WSIST/WSIST.Web/Components/Pages/Home.razor.cs
The empty upcoming-tests state adds an Add Test button that opens the add-test modal, and the temporary test title now initializes to an empty string.
Modal field validation
WSIST/WSIST.Web/Components/Pages/Home.razor
The add/edit modal title input is required, and the grade input shows a 1.0 – 6.0 placeholder.

Page Titles, Meta Tags, and Privacy Text

Layer / File(s) Summary
Page titles and login metadata
WSIST/WSIST.Web/Components/Pages/Login.razor, WSIST/WSIST.Web/Components/Pages/Privacy.razor, WSIST/WSIST.Web/Components/Pages/Terms.razor
Login uses a fixed title and adds head metadata for SEO/social previews, while Privacy and Terms switch to fixed titles.
Privacy policy retention text
WSIST/WSIST.Web/Resources/SharedResource.resx, WSIST/WSIST.Web/Resources/SharedResource.de.resx
Privacy_Sec6 in English and German now mentions in-app account deletion alongside the existing email contact and 30-day deletion language.
Study comments
WSIST/WSIST.Web/Components/Pages/Study.razor.cs
Inline comments in GetBecauseText describe the average grade scoring factor and its contribution when avgGrade is above zero.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • timh8127/WSIST#26: Also changes the Home add/edit test modal flow in Home.razor and Home.razor.cs.
  • timh8127/WSIST#34: Also updates the privacy policy text in the same resx entries.
  • timh8127/WSIST#32: Also touches the same page title surface on Privacy.razor and Terms.razor.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is related to the changes but too vague to describe the main update in the PR. Rename it to a concise summary of the primary changes, such as adding SEO titles/meta tags, a test button, and privacy policy updates.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/chrome-review-bugs

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.

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
WSIST/WSIST.Web/Components/Pages/Home.razor (1)

213-214: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Add client-side required to Title input now that the dev pre-fill is gone.

With temporaryTest.Title now initialized to string.Empty (Home.razor.cs, Line 116) instead of "Some Test", users can submit the add-test form with a blank title. NewTestMaker/TestEditor throw ArgumentException for empty/whitespace titles, and ModalSubmit doesn't catch it, so this will surface as an unhandled exception instead of a validation message.

🩹 Proposed fix
-<input type="text" `@bind`="`@temporaryTest.Title`" placeholder="`@localizer`["Modal_TitlePlaceholder"]"/>
+<input type="text" `@bind`="`@temporaryTest.Title`" placeholder="`@localizer`["Modal_TitlePlaceholder"]" required/>
🤖 Prompt for 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.

In `@WSIST/WSIST.Web/Components/Pages/Home.razor` around lines 213 - 214, The
add-test Title field in Home.razor now allows an empty value because
temporaryTest.Title starts as string.Empty, which can reach ModalSubmit and
trigger an uncaught ArgumentException from NewTestMaker/TestEditor. Update the
input in the Home.razor modal to enforce client-side required validation for the
Title field so blank submissions are blocked before submission, and keep the fix
aligned with the existing temporaryTest.Title binding and the modal form’s
submit flow.
🧹 Nitpick comments (3)
WSIST/WSIST.Web/Components/Pages/Terms.razor (1)

5-5: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Hardcoded PageTitle inconsistent with localized <h1>.

Same issue as Privacy.razor/Login.razor: line 20 still uses @Localizer["Terms_Title"] for the heading while the tab title is now fixed English text.

🤖 Prompt for 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.

In `@WSIST/WSIST.Web/Components/Pages/Terms.razor` at line 5, The page title in
Terms.razor is hardcoded in English while the visible heading still uses the
localized Terms_Title key, creating inconsistent localization. Update the
PageTitle markup to use the same localization source as the <h1> in the Terms
page, or align both so they come from the same localized value in the Terms
component.
WSIST/WSIST.Web/Components/Pages/Privacy.razor (1)

5-5: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Hardcoded PageTitle inconsistent with localized <h1>.

Line 20 still renders @Localizer["Privacy_Title"] for the on-page heading, but the browser tab title is now a fixed English string. This is the same pattern flagged in Login.razor — a dedicated localized page-title resource key would keep both in sync across languages.

🤖 Prompt for 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.

In `@WSIST/WSIST.Web/Components/Pages/Privacy.razor` at line 5, The page title in
Privacy.razor is hardcoded and can drift from the localized heading rendered by
the component. Update the PageTitle usage to use a localized resource key in the
same way as the on-page heading, and keep it aligned with the existing
Localizer-based pattern used by Privacy_Title so the browser tab title matches
the selected language.
WSIST/WSIST.Web/Components/Pages/Login.razor (1)

5-5: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Hardcoded PageTitle breaks localization.

The tab title is now a fixed English string, even though the rest of the page (nav labels, hero copy) is rendered via @Localizer[...] and the app supports a German locale (per LanguageToggle). German users will see an English browser tab title.

♻️ Suggested fix: keep title localized
-<PageTitle>WSIST — What Should I Study Today?</PageTitle>
+<PageTitle>`@Localizer`["Landing_PageTitle"]</PageTitle>

Add a Landing_PageTitle resource key (with an English and German value) to both .resx files.

🤖 Prompt for 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.

In `@WSIST/WSIST.Web/Components/Pages/Login.razor` at line 5, The Login page title
is hardcoded in PageTitle, which bypasses localization. Update the Login.razor
PageTitle to use the existing Localizer pattern with a new Landing_PageTitle
resource key, and add matching English and German entries to both resx files so
the browser tab title follows the selected language.
🤖 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.

Outside diff comments:
In `@WSIST/WSIST.Web/Components/Pages/Home.razor`:
- Around line 213-214: The add-test Title field in Home.razor now allows an
empty value because temporaryTest.Title starts as string.Empty, which can reach
ModalSubmit and trigger an uncaught ArgumentException from
NewTestMaker/TestEditor. Update the input in the Home.razor modal to enforce
client-side required validation for the Title field so blank submissions are
blocked before submission, and keep the fix aligned with the existing
temporaryTest.Title binding and the modal form’s submit flow.

---

Nitpick comments:
In `@WSIST/WSIST.Web/Components/Pages/Login.razor`:
- Line 5: The Login page title is hardcoded in PageTitle, which bypasses
localization. Update the Login.razor PageTitle to use the existing Localizer
pattern with a new Landing_PageTitle resource key, and add matching English and
German entries to both resx files so the browser tab title follows the selected
language.

In `@WSIST/WSIST.Web/Components/Pages/Privacy.razor`:
- Line 5: The page title in Privacy.razor is hardcoded and can drift from the
localized heading rendered by the component. Update the PageTitle usage to use a
localized resource key in the same way as the on-page heading, and keep it
aligned with the existing Localizer-based pattern used by Privacy_Title so the
browser tab title matches the selected language.

In `@WSIST/WSIST.Web/Components/Pages/Terms.razor`:
- Line 5: The page title in Terms.razor is hardcoded in English while the
visible heading still uses the localized Terms_Title key, creating inconsistent
localization. Update the PageTitle markup to use the same localization source as
the <h1> in the Terms page, or align both so they come from the same localized
value in the Terms component.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ec1f6be0-b4c4-4ed1-928d-260a692eb4ef

📥 Commits

Reviewing files that changed from the base of the PR and between 121633d and fafd19f.

📒 Files selected for processing (8)
  • WSIST/WSIST.Web/Components/Pages/Home.razor
  • WSIST/WSIST.Web/Components/Pages/Home.razor.cs
  • WSIST/WSIST.Web/Components/Pages/Login.razor
  • WSIST/WSIST.Web/Components/Pages/Privacy.razor
  • WSIST/WSIST.Web/Components/Pages/Study.razor.cs
  • WSIST/WSIST.Web/Components/Pages/Terms.razor
  • WSIST/WSIST.Web/Resources/SharedResource.de.resx
  • WSIST/WSIST.Web/Resources/SharedResource.resx

With the "Some Test" pre-fill removed, an empty title could reach
NewTestMaker/TestEditor, which throw ArgumentException for blank titles.
Native form validation now blocks empty submissions client-side.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@timh8127

timh8127 commented Jul 1, 2026

Copy link
Copy Markdown
Owner Author

Review disposition:

  • Major — blank title causes unhandled ArgumentException: Confirmed and fixed in 11ebc8f. NewTestMaker/TestEditor throw on empty/whitespace titles and ModalSubmit doesn't catch, so the removed pre-fill made blank submits an unhandled-exception path. Added required to the Title input; the modal is a native <form @onsubmit> so browser constraint validation blocks empty submissions before the submit event fires.
  • Nitpicks (hardcoded PageTitle in Login/Privacy/Terms): Skipped — the explicit English titles are deliberate per the task spec (wsist-task.md Task 1) for stable SEO titles. Localizing them can be revisited separately if desired.

@DG-TimHug

Copy link
Copy Markdown
Collaborator

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@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

🧹 Nitpick comments (1)
WSIST/WSIST.Web/Components/Pages/Login.razor (1)

6-15: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider adding og:image/twitter:image.

Social previews without an image tend to render as plain text cards on most platforms. Since this PR is explicitly adding OG/Twitter metadata for social previews, an image would meaningfully improve share appearance.

🤖 Prompt for 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.

In `@WSIST/WSIST.Web/Components/Pages/Login.razor` around lines 6 - 15, The social
metadata in Login.razor is missing preview images, so update the HeadContent
block to include og:image and twitter:image alongside the existing og:title,
og:description, and twitter tags. Use the same Login.razor HeadContent section
to add a representative image URL that will be used for shared links, and keep
the Twitter card metadata consistent with the Open Graph fields.
🤖 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 `@WSIST/WSIST.Web/Components/Pages/Home.razor`:
- Line 213: Whitespace-only titles are still allowed through the Home.razor
modal input, which can cause ModalSubmit to hit ArgumentException in
TestManagement.NewTestMaker/TestEditor. Update the submit flow in ModalSubmit to
trim temporaryTest.Title and reject empty-or-whitespace values before calling
the test creation/editing methods, and ensure any validation error is handled
gracefully instead of bubbling up.

---

Nitpick comments:
In `@WSIST/WSIST.Web/Components/Pages/Login.razor`:
- Around line 6-15: The social metadata in Login.razor is missing preview
images, so update the HeadContent block to include og:image and twitter:image
alongside the existing og:title, og:description, and twitter tags. Use the same
Login.razor HeadContent section to add a representative image URL that will be
used for shared links, and keep the Twitter card metadata consistent with the
Open Graph fields.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2de1bfba-930e-40ee-a99b-31141cce748c

📥 Commits

Reviewing files that changed from the base of the PR and between 121633d and 11ebc8f.

📒 Files selected for processing (8)
  • WSIST/WSIST.Web/Components/Pages/Home.razor
  • WSIST/WSIST.Web/Components/Pages/Home.razor.cs
  • WSIST/WSIST.Web/Components/Pages/Login.razor
  • WSIST/WSIST.Web/Components/Pages/Privacy.razor
  • WSIST/WSIST.Web/Components/Pages/Study.razor.cs
  • WSIST/WSIST.Web/Components/Pages/Terms.razor
  • WSIST/WSIST.Web/Resources/SharedResource.de.resx
  • WSIST/WSIST.Web/Resources/SharedResource.resx

Comment thread WSIST/WSIST.Web/Components/Pages/Home.razor
DG-TimHug and others added 2 commits July 2, 2026 08:19
The browser's `required` only blocks truly empty input; a title of
spaces passed HTML validation and crashed the circuit with an
ArgumentException from NewTestMaker/TestEditor. Trim the title in
ModalSubmit and show a localized inline error instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds a branded 1200x630 preview card (site palette: #0c0b08 bg,
#f5b342 accent) and upgrades the Twitter card to summary_large_image.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@timh8127
timh8127 merged commit 56a2cde into main Jul 2, 2026
2 checks passed
@timh8127
timh8127 deleted the fix/chrome-review-bugs branch July 2, 2026 06:38
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.

2 participants