Repository navigation
Conversation
|
lgtm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title:
fix(react): resolve React Flight stream chunk references in snapshotQuestList
Description:
Summary
In the Next.js App Router (React Server Components), Microsoft Rewards frequently streams quest cards using deferred Flight stream chunk references (e.g.
children: ["$L82", "$L83"]) instead of inlining the card component markup directly in the parent link block.When this occurs,
snapshotQuestListpreviously scanned only the immediate window (at + 4000) near the anchor link. Because the referenced chunks (containing the title, points badge["+","50"], and progress0 von 6) are streamed tens of thousands of characters down the stream,pointProgressMaxdefaulted to0and the title was missed or mismatched with subsequent sections. As a result, withskipNonPointTasks: true, actionable multi-step punchcards (such as the 50-point Halloween Quest or seasonal cards) were erroneously skipped.Changes
buildFlightChunkMap: Parses and maps Next.js RSC Flight stream chunk definitions (<id>:...) across the payload.snapshotQuestList, scans the card region for$L<id>references and dynamically appends the payload of referenced chunks.["+","150"]and["","150"]formats.0/6,0 von 6,0 of 6).pointProgressMaxcorrectly retains the maximum points detected across chunks.Testing
$L82and$L83.npm run build) and Prettier code style checks pass with 0 errors.