Ma77Ball opened a new pull request, #5615:
URL: https://github.com/apache/texera/pull/5615

   ### What changes were proposed in this PR?
   
   Backport of #5311 ("fix(frontend): stop forum login from looping when Flarum 
auth fails") to `release/v1.2`.
   
   Applies as a clean `git cherry-pick -x` of the merged squash commit 
`af664995`, no conflicts and no prerequisite chain. Frontend-only: 2 files 
changed, 75 insertions, 4 deletions. The introduced diff is identical to the 
original PR (only blob-index hashes in the patch header differ).
   
   For the full change description see #5311. In brief: 
`DashboardComponent.forumLogin` recursed `auth -> register -> auth` without 
bound when Flarum `auth()` kept failing with a non-404/500 status. This adds an 
`attemptRegister` flag so registration is attempted at most once (the 
post-register call passes `forumLogin(false)`, which then falls through to 
`displayForum = false`), and adds an error handler on the `register()` 
subscription so a failed registration hides the forum instead of being silently 
dropped.
   
   ### Any related issues, documentation, discussions?
   
   Backports #5311 (which closes #5310 on `main`). Requested by @xuang7 for the 
v1.2 release; the PR was merged before the `release/v1.2` label existed, so 
auto-backport did not trigger.
   
   ### How was this PR tested?
   
   This is a backport with no changes beyond the single cherry-picked commit, 
so it relies on the existing tests carried over from #5311 (added cases in 
`dashboard.component.spec.ts` covering the bounded retry and the 
failed-registration path). Run them with `yarn test 
--include='**/dashboard.component.spec.ts'` from `frontend/`.
   
   Backport fidelity was verified locally: the diff introduced by the 
cherry-pick is byte-identical to the original #5311 diff. The 
`dashboard.component.ts` file is not byte-identical to `main@af664995` only 
because `release/v1.2` lacks the unrelated footer change (#5153/#5444) that 
renamed `gitCommitHash`/`Version.raw` to `buildNumber`/`Version.buildNumber`; 
that line is outside the `forumLogin` fix and is left untouched here.
   
   Full compile and unit-test runs are left to CI.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 4.8)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to