Skip to content

feat(google-docs): review screen with highlighted mappings [INTEG-3756]#10833

Merged
Harika Kondur (harikakondur) merged 16 commits intomasterfrom
google-docs-document-outline
Apr 14, 2026
Merged

feat(google-docs): review screen with highlighted mappings [INTEG-3756]#10833
Harika Kondur (harikakondur) merged 16 commits intomasterfrom
google-docs-document-outline

Conversation

@harikakondur
Copy link
Copy Markdown
Contributor

@harikakondur Harika Kondur (harikakondur) commented Apr 6, 2026

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 MappingReviewPage and DocumentOutline flow, 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 MappingReviewPage shell

  • add a DocumentOutline renderer that:

    • builds segments from the normalized document
    • highlights mapped blocks/table parts
    • shows entry overview cards to filter the outline by entry
    • renders mapping cards aligned to the corresponding document region
  • split document-outline logic into smaller utilities for:

    • building the document structure
    • building highlight indexes
    • building text segments
    • rendering blocks/tables
    • positioning mapping cards
  • update Page and ModalOrchestrator so mapping-review payloads are handled as their own screen state

  • add an optional local fixture loader to make the review UI easier to iterate on during development

Screenshot 2026-04-12 at 11 41 13 PM

Dependencies and/or References

  • Adds @contentful/f36-icons for review-page/document-outline UI
  • Refactors Google Docs workflow/types to use entryBlockGraph and normalizedDocument types

Joaquin (joaquincasal) and others added 10 commits April 1, 2026 16:35
* 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-inc-38d59fb8d7
Copy link
Copy Markdown

wiz-inc-38d59fb8d7 bot commented Apr 14, 2026

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 1 Medium
Software Management Finding Software Management Findings -
Total 1 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

@harikakondur Harika Kondur (harikakondur) marked this pull request as ready for review April 14, 2026 16:15
@harikakondur Harika Kondur (harikakondur) requested a review from a team as a code owner April 14, 2026 16:15
Copilot AI review requested due to automatic review settings April 14, 2026 16:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 new DocumentOutline + mapping-card rail UI with highlight/hover behavior.
  • Refactor and expand workflow/document types (new entryBlockGraph and normalizedDocument modules).
  • 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.

Comment thread apps/google-docs/src/utils/getEntryTitle.ts
Comment thread apps/google-docs/package.json
Comment thread apps/google-docs/src/locations/Page/Page.tsx
Comment thread apps/google-docs/test/locations/Page/components/mainpage/PreviewPageView.spec.tsx Outdated
Comment thread apps/google-docs/src/locations/Page/components/review/DocumentOutline.tsx Outdated
Comment thread apps/google-docs/src/locations/Page/Page.tsx Outdated
Comment thread apps/google-docs/src/locations/Page/components/review/utils/renderDocument.tsx Outdated
@harikakondur Harika Kondur (harikakondur) changed the title post hil review page feature branch feat(google-docs): review screen with highlighted mappings [INTEG-3756] Apr 14, 2026
Copy link
Copy Markdown
Contributor

@ryunsong-contentful ryunsong-contentful left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@harikakondur Harika Kondur (harikakondur) merged commit c99a6e7 into master Apr 14, 2026
14 checks passed
@harikakondur Harika Kondur (harikakondur) deleted the google-docs-document-outline branch April 14, 2026 20:58
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.

5 participants