Code Review Bench PR #25463 - Moved to kebab-case formatting signup-form#6
Code Review Bench PR #25463 - Moved to kebab-case formatting signup-form#6ketkarameya wants to merge 3 commits intobase_pr_25463_20260125_3575from
Conversation
- renamed files to kebab-case Changelog for v0.3.2 -> 0.3.3:
| @@ -27,7 +27,6 @@ export const FormPage: React.FC = () => { | |||
| if (minimal) { | |||
| // Don't go to the success page, but show the success state in the form | |||
| setSuccess(true); | |||
There was a problem hiding this comment.
⚠️ Bug: Removed setLoading(false) causes stuck loading spinner
The removal of setLoading(false) on the minimal success path is a behavioral change that introduces a UI bug. When a user successfully submits the form in minimal mode:
setLoading(true)is called at line 21- After success,
setSuccess(true)is called at line 29, butloadingremainstrue
In form-view.tsx, the "Email sent" text visibility depends on loading || !success (line 80) — when loading is still true, this condition is truthy, so the "Email sent" confirmation text stays invisible. Meanwhile, the loading spinner's visibility depends on !loading (line 81) — since loading is still true, the spinner remains visible.
Result: After successful submission in minimal mode, the user sees an infinite loading spinner instead of the "Email sent" confirmation message. The form appears to hang even though the submission succeeded.
Was this helpful? React with 👍 / 👎
| setSuccess(true); | |
| // Don't go to the success page, but show the success state in the form | |
| setSuccess(true); | |
| setLoading(false); |
- Apply suggested fix
| const history = getDefaultUrlHistory(); | ||
| if (history) { | ||
| return history; | ||
| } | ||
| return history; |
There was a problem hiding this comment.
⚠️ Bug: getUrlHistory can now return undefined for same-site embeds
The previous code had a guard:
if (history) {
return history;
}This ensured that when getDefaultUrlHistory() returned undefined (no sessionStorage data, non-array data, or error), execution would fall through to construct a default URLHistory array with the current page info.
The new code unconditionally returns the result:
return history;getDefaultUrlHistory() returns undefined in three cases: (1) no ghost-history key in sessionStorage, (2) parsed value is not an array, (3) sessionStorage access error. In all these cases, getUrlHistory now returns undefined instead of the fallback history entry.
Since the return type is URLHistory (a typed array), this is a type mismatch. The value is passed to JSON.stringify in api.tsx line 38 as urlHistory, which would serialize to undefined (omitted from JSON). This means the API request loses attribution data for same-site embeds when sessionStorage has no history, instead of providing the fallback with the current page as referrer.
Was this helpful? React with 👍 / 👎
| const history = getDefaultUrlHistory(); | |
| if (history) { | |
| return history; | |
| } | |
| return history; | |
| const history = getDefaultUrlHistory(); | |
| if (history) { | |
| return history; | |
| } |
- Apply suggested fix
There was a problem hiding this comment.
Configure merge blocking · Maintainers can dismiss this review. Gitar never approves changes.
Code Review
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | Gitar
Benchmark PR for Gitar evaluation
Original PR: agentic-review-benchmarks#5
Refactors signup-form components to use kebab-case naming convention.