Repository navigation
Conversation
Sign a web version token per message (new trackingtoken purpose) and expose it to templates as view_in_browser_url for broadcasts and automations. Outside that scope the variable renders empty, and a value supplied by the caller is kept. Automation emails now record their template version and template data in message history, like broadcasts.
The link editor gets a "Web version of the email" link type that inserts
{{ view_in_browser_url }} and recognises it when reopened, the code editor
suggests the variable, the AI assistant prompt documents it, and the default
test data carries a sample address.
Serve a web version only when the email content uses the variable, keep /v/ requests out of traces, allow downloads under the sandbox, answer the preview link with a page that explains it, log abandoned requests at debug level, and document the guard with blank and the reserved /v/ path.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #502 +/- ##
==========================================
+ Coverage 88.73% 88.76% +0.03%
==========================================
Files 365 367 +2
Lines 71197 71409 +212
==========================================
+ Hits 63174 63384 +210
Misses 5397 5397
- Partials 2626 2628 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Implements point 1 of #441.
What it does
{{ view_in_browser_url }}. Broadcasts (all three send paths) and automations fill it with<endpoint>/v/<token>. Transactional and double opt-in emails leave it empty.v. It is signed with the workspace key, bound to the workspace and the message, and has no unsigned or legacy form.GET /v/<token>verifies the token, then re-renders the template version recorded for that message, using the data recorded in message history. Tracking is off: no pixel, no/r/redirect, no identity token. Links keep the UTM parameters of the send./v/preview(the sample link in template previews and test emails) answers with a page that explains it.Security
sandbox allow-popups allow-popups-to-escape-sandbox allow-downloads,default-src 'none',form-action 'none',frame-ancestors 'none',base-uri 'none'.no-referrer,private, no-store,noindex, nofollowandnosniff./v/requests are not traced, so tokens never reach the trace backend.Console
Release
vis now shadowed by/v/.Tests
BuildTemplateData, each send path, the repository read, the service, the handler, route wiring and tracing.TestWebVersion):/r/link redirects to/v/go test ./internal/... ./pkg/...and the full integration suite pass. The console suite passes (npx vitest run, 2,100 tests), as dotsc -band eslint.Known limits, not addressed here
Docs: Notifuse/docs#25.