This repository was archived by the owner on Aug 7, 2026. It is now read-only.
fix: yivi-dialog uses pg4ol client-id and live package version in PKG/Cryptify header - #105
Merged
Merged
Conversation
The yivi-dialog runtime built the X-PostGuard-Client-Version header inline as `Outlook,1.0,pg4outlook,0.1.0`, missing both the PR #11 fix that switched the client-id token to `pg4ol` and the X-Cryptify-Source header that pkg-client's clientHeaders() adds. Three files also held a local `const ADDIN_VERSION = "0.1.0"` that has never matched package.json, so PKG / Cryptify dashboards could not distinguish releases. Wire process.env.ADDIN_VERSION through webpack DefinePlugin from package.json (same mechanism already used for PKG_URL / CRYPTIFY_URL / ADDIN_PUBLIC_URL), export a single ADDIN_VERSION from src/lib/pkg-client.ts, drop the three stale local constants, and route the dialog through clientHeaders() like the taskpane already does. Closes #103
Contributor
|
/dobby resolve conflicts |
Contributor
Author
|
Dobby has received the request! Routing to the right specialist now... |
Resolve conflicts in src/taskpane/compose-view.ts and src/taskpane/read-view.ts. Master (#107) extracted HEADER_* constants and byId/guessContentType into shared libs; this branch (#105) wires ADDIN_VERSION through pkg-client from package.json. Combine: keep the ADDIN_VERSION import on pkg-client, take the new pg-headers / dom / mime imports from master, drop the legacy local ADDIN_VERSION and HEADER_* declarations.
Contributor
Author
|
Conflicts resolved against Resolution in
Resolution in
Verification:
|
rubenhensen
approved these changes
Jun 3, 2026
2 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Two related defects in the X-PostGuard-Client-Version header that the launchevent's Yivi dialog sends to PKG and Cryptify:
src/yivi-dialog/yivi-dialog.ts:135built the header inline asOutlook,1.0,pg4outlook,${ADDIN_VERSION}. The PR fix: use pg4ol metric client id to match PKG convention #11 fix for the taskpane is reapplied here — the dialog now callsclientHeaders(ADDIN_VERSION)fromsrc/lib/pkg-client.ts, which producesOutlook,1.0,pg4ol,<version>and also stampsX-Cryptify-Source: outlook(cryptify'sdetect_channelwas misclassifying dialog-flow uploads without it).const ADDIN_VERSION = "0.1.0"declarations (yivi-dialog, compose-view, read-view) never matchedpackage.json(0.4.0 today, 0.5.0 in chore(master): release 0.5.0 #95).ADDIN_VERSIONis now exported fromsrc/lib/pkg-client.ts, sourced viaprocess.env.ADDIN_VERSIONwhich webpack'sDefinePluginpopulates frompackage.jsonat build time — same mechanism already used forPKG_URL,CRYPTIFY_URL,ADDIN_PUBLIC_URL. No release-please config change needed;package.jsonis the source of truth and release-please already bumps it.Out of scope
POSTGUARD_VERSION = "0.1.0"inlaunchevent.ts:41andcompose-view.ts:61is the value of thex-postguardinterop marker header (independent signal that the message went through PostGuard), not the metrics header. Left alone — its lifecycle is different and the issue does not call for it.Verification
npm run build— green (pre-existing taskpane/yivi-dialog size warnings only).npm run lint— green.npx tsc --noEmit— green.npm run validate— manifest valid.grep -rn "pg4outlook\|pg4ol" src→ onlypg4ol(inpkg-client.ts). Nopg4outlookleft.grep -ao "pg4ol,[0-9.]*" dist/yivi-dialog.js→pg4ol,0.4.0.grep -ao 'X-Cryptify-Source[^,]*outlook' dist/yivi-dialog.js dist/taskpane.js→ both bundles emitX-Cryptify-Source":"outlook.Manual smoke test (Encrypt-on-send dialog flow) is left to the maintainer — I don't have an Outlook host in this workspace.
Closes #103