0065: app: frontend: Add manifest-declared legal documents - #7299
Open
illume wants to merge 1 commit into
Open
Conversation
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: illume The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
illume
marked this pull request as draft
August 16, 2026 21:49
Contributor
There was a problem hiding this comment.
Pull request overview
Adds manifest-declared legal documents to desktop builds and exposes them through IPC in the Version dialog.
Changes:
- Validates, packages, and reads legal documents.
- Adds About/Legal tabs and document dialogs.
- Adds unit and end-to-end coverage.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
frontend/src/components/App/VersionDialog.tsx |
Adds legal-document tabs. |
frontend/src/components/App/VersionDialog.test.tsx |
Tests dialog behavior. |
frontend/src/components/App/LegalDocuments.tsx |
Implements legal-document UI. |
frontend/src/components/App/LegalDocuments.test.tsx |
Tests loading and errors. |
e2e-tests/tests/legalDocuments.spec.ts |
Adds the user-flow test. |
app/package.json |
Packages license resources. |
app/electron/preload.ts |
Exposes legal IPC methods. |
app/electron/main.ts |
Registers legal IPC handlers. |
app/electron/legal-documents.ts |
Validates and reads documents. |
app/electron/legal-documents.test.ts |
Tests validation and reads. |
app/app-build-manifest.json |
Declares bundled documents. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| legalDocuments.map(({ id, title }) => ({ id, title })) | ||
| ); | ||
| ipcMain.handle('get-legal-document', (_event, id: unknown) => | ||
| readLegalDocument(process.resourcesPath, legalDocuments, id) |
Comment on lines
+71
to
+73
| async function openDocument(document: LegalDocument): Promise<void> { | ||
| try { | ||
| const result = await window.desktopApi?.getLegalDocument?.(document.id); |
| .click(); | ||
| await expect(assistantDialog).not.toBeVisible(); | ||
| } | ||
| await page.getByRole("button", { name: "Settings" }).click(); |
| file !== '.' && | ||
| file !== '..' | ||
| ); | ||
| }); |
| import os from 'node:os'; | ||
| import path from 'node:path'; | ||
| import { afterEach, beforeEach, describe, expect, it } from 'vitest'; | ||
| import { getLegalDocuments, loadLegalDocuments, readLegalDocument } from './legal-documents'; |
| /> | ||
| {hasLegalDocuments ? ( | ||
| <Tabs | ||
| ariaLabel={t('translation|About dialog tabs')} |
illume
force-pushed
the
upstream-0065-manifest-legal-documents
branch
from
August 16, 2026 22:08
a612534 to
6c17d60
Compare
illume
force-pushed
the
upstream-0065-manifest-legal-documents
branch
from
August 17, 2026 07:45
6c17d60 to
269fcbe
Compare
illume
force-pushed
the
upstream-0065-manifest-legal-documents
branch
from
August 17, 2026 07:46
269fcbe to
1f17dca
Compare
Expose packaged legal documents through a validated desktop IPC capability. This lets downstream builds declare legal content without forking the UI. Co-authored-by: René Dudfield <renedudfield@microsoft.com>
illume
force-pushed
the
upstream-0065-manifest-legal-documents
branch
from
August 17, 2026 07:57
1f17dca to
48adada
Compare
illume
marked this pull request as ready for review
August 17, 2026 07:57
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.
Summary
app-build-manifest.json.Source
a40e4f73acbdcd9da28ead9924eb22886f9ba680upstreamable: combine legal documents with host capabilitiesThe source SHA is preserved in patch 0065 from Azure PR 823, although the
force-pushed source commit is no longer directly reachable on GitHub. The
implementation commit preserves Joaquim's author identity and date and adds
René Dudfield as co-author.
Improvements over the existing changes
path instead of depending on downstream-only host-capability commits. This
keeps the upstream change self-contained and avoids reading divergent files.
manifests, every field guard, unreadable and escaping paths, rejected IPC
calls, host capability absence, fallback errors, stale async work, and dialog
interactions. This raises branch coverage above 80% for every changed module.
This protects the complete user path that was not covered by the source patch.
return values with TSDoc so the desktop contract is explicit.
Testing
app/electron/legal-documents.ts: 100% branch coverage, 31 testsfrontend/src/components/App/LegalDocuments.tsx: 93.75% branch coveragefrontend/src/components/App/VersionDialog.tsx: 100% branch coveragenpm run tsc -- --noEmitinappandfrontendnpm run compile-electronnpm run buildinfrontendScreenshots
Large (1280 x 800)
Medium (768 x 1024)
Mobile (390 x 844)
Dependencies
None.
Assisted by copilot.