feat(google-docs): review screen with highlighted mappings [INTEG-3756]#10833
Merged
Harika Kondur (harikakondur) merged 16 commits intomasterfrom Apr 14, 2026
Merged
feat(google-docs): review screen with highlighted mappings [INTEG-3756]#10833Harika Kondur (harikakondur) merged 16 commits intomasterfrom
Harika Kondur (harikakondur) merged 16 commits intomasterfrom
Conversation
* refactor: remove SimpleReviewScreen and integrate mapping view into previewPageView * fix: cleanup layout
…[INTEG-3572] (#10861) * wip: cell level mappings * refactor: remove fixture-loader and related types, integrate DocumentOutline for mapping review * fix: remove duplicate resumeMappingReview function * fix: revert overview section changes * fix: update review component test folder path * fix: removing section based document rendering * feat: add index based highlighting * fix: reorganize util files * fix: fixture loader build error * fix: rename `orderDocument` to `buildDocument` * refactor: simplify MappingReviewPage by removing conditional rendering and unused utility function * refactor(google-docs): remove unused resumeMappingReview and resetFlowFromPreviewCancel handlers * fix: move render table/block functions into separate util file
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
Copilot started reviewing on behalf of
Harika Kondur (harikakondur)
April 14, 2026 16:15
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new “mapping review” UI flow for the Google Docs app, including a DocumentOutline renderer that visualizes mapped fields alongside document content, plus supporting type refactors and test updates.
Changes:
- Add a mapping-review page (
MappingReviewPage) and a newDocumentOutline+ mapping-card rail UI with highlight/hover behavior. - Refactor and expand workflow/document types (new
entryBlockGraphandnormalizedDocumentmodules). - Update tests and tooling (jest-dom types, new mapping-review flow assertions, fixture loader).
Reviewed changes
Copilot reviewed 26 out of 28 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/google-docs/tsconfig.json | Adds jest-dom types for tests. |
| apps/google-docs/test/locations/Page/components/mainpage/PreviewPageView.spec.tsx | Reworks tests to target mapping review page (currently has an assertion mismatch). |
| apps/google-docs/test/locations/Page/components/mainpage/ModalOrchestrator.spec.tsx | Adds coverage for routing mapping-review suspends. |
| apps/google-docs/test/locations/Page/Page.spec.tsx | Updates Page tests for mapping-review/fixture flow. |
| apps/google-docs/src/utils/utils.ts | Removes mapping-review type guard utility. |
| apps/google-docs/src/utils/getEntryTitle.ts | Adds utility to derive an entry title from content type display field. |
| apps/google-docs/src/utils/checkboxEntryList.ts | Minor cleanup (removes unused import). |
| apps/google-docs/src/types/workflow.ts | Refactors workflow types; introduces EntryBlockGraph/NormalizedDocument imports and content type shapes. |
| apps/google-docs/src/types/normalizedDocument.ts | New normalized document type definitions (blocks/tables/runs). |
| apps/google-docs/src/types/entryBlockGraph.ts | New entry-block-graph types and type guards. |
| apps/google-docs/src/types/index.ts | Re-exports new types modules. |
| apps/google-docs/src/locations/Page/components/review/utils/buildDocument.ts | Builds tab/segment structure from normalized document. |
| apps/google-docs/src/locations/Page/components/review/utils/buildHighlights.ts | Computes highlight indexes for mapping visualization. |
| apps/google-docs/src/locations/Page/components/review/utils/buildTextSegments.ts | Splits text into highlighted/unhighlighted segments (current implementation can be quadratic). |
| apps/google-docs/src/locations/Page/components/review/utils/documentOutlineUtils.ts | List marker generation and overview entry building for mapping review. |
| apps/google-docs/src/locations/Page/components/review/utils/mappingCardPositioning.ts | Computes mapping-card anchor ids and resolves non-overlapping card offsets. |
| apps/google-docs/src/locations/Page/components/review/utils/renderDocument.tsx | Renders blocks/tables with highlight/hover behavior (table image highlighting currently too broad). |
| apps/google-docs/src/locations/Page/components/review/MappingCard.tsx | New mapping card UI component. |
| apps/google-docs/src/locations/Page/components/review/DocumentOutline.tsx | New mapping-review document outline component (offset measurement currently not resilient to layout changes). |
| apps/google-docs/src/locations/Page/components/mainpage/PreviewPageView.tsx | Removes old preview page implementation. |
| apps/google-docs/src/locations/Page/components/mainpage/MappingReviewPage.tsx | Adds new mapping review page wrapper around DocumentOutline. |
| apps/google-docs/src/locations/Page/components/mainpage/ModalOrchestrator.tsx | Removes imperative resume/reset helpers; routes mapping-review suspends to onMappingReviewReady. |
| apps/google-docs/src/locations/Page/components/mainpage/MainPageView.tsx | Minor formatting change. |
| apps/google-docs/src/locations/Page/Page.tsx | Switches page rendering to mapping-review; adds fixture-based “Mock from fixture” entry point (preview flow currently not rendered). |
| apps/google-docs/src/fixtures/googleDocsReview/loadFixtureReviewPayload.ts | Adds dynamic fixture payload loader. |
| apps/google-docs/package.json | Adds @contentful/f36-icons (currently at v6, mismatched with F36 v5 stack). |
| apps/google-docs/package-lock.json | Lockfile updates for icon dependency resolution. |
| .gitignore | Ignores local fixture JSON. |
Files not reviewed (1)
- apps/google-docs/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
602f656 to
1a0e814
Compare
1a0e814 to
ba6d674
Compare
ed859d4 to
af57d01
Compare
ryunsong-contentful
approved these changes
Apr 14, 2026
Contributor
ryunsong-contentful
left a comment
There was a problem hiding this comment.
The state of organization is pretty rough so we're going to merge this and we'll pair and do an immediate refactor follow up PR
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.
Purpose
Add a dedicated mapping review experience to the Google Docs app for runs that suspends and shows the normalized document, highlights mapped content.
Approach
This PR introduces a new
MappingReviewPageandDocumentOutlineflow, and updates the page/orchestration logic so mapping-review suspends are routed there instead of being treated like a normal preview.Key pieces (mostly from this pr: #10861):
add a
MappingReviewPageshelladd a
DocumentOutlinerenderer that:split document-outline logic into smaller utilities for:
update
PageandModalOrchestratorso mapping-review payloads are handled as their own screen stateadd an optional local fixture loader to make the review UI easier to iterate on during development
Dependencies and/or References
@contentful/f36-iconsfor review-page/document-outline UIentryBlockGraphandnormalizedDocumenttypes