Repository navigation
fix: show the current icon on the auth result pages - #84
Conversation
The success and failure pages had their own inline copy of the old artwork. They now load LOGO_URI, the PNG the consent screen shows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@doistbot /review |
doistbot
left a comment
There was a problem hiding this comment.
This update consolidates the auth icon on the shared LOGO_URI across the local callback pages, replacing the outdated inline SVGs. No inline issues were flagged.
I also included a few optional follow-up notes in the details below.
Optional follow-up notes (3)
src/lib/auth-constants.ts:7: This comment references
docs/icon.md, but no such file exists in the repo (docs/only hascomms-search.mdandSPEC.md). Either commit that doc on this branch or drop the parenthetical so the comment doesn't point readers to a dead file.src/lib/auth-pages.ts:4: These pages are the OAuth callback HTML, so their URL can carry the authorization
codeandstate(e.g.http://localhost:8766/callback?code=...&state=...). The new<img>loadshttps://raw.githubusercontent.com/...without areferrerpolicy, so browsers that still default tono-referrer-when-downgradewill send the full callback URL — including the code — to GitHub in theRefererheader. Addreferrerpolicy="no-referrer"to this<img>(or a<meta name="referrer" content="no-referrer">in both page<head>s) so the code never leaves the callback request.src/lib/auth-pages.test.ts:12: The negative assertion checks an incidental Figma group id (
Size=72, Style=Color) from the old SVG rather than the observable contract (no inline 72px logo SVG). If a different inline copy ever comes back, this test still passes. Preferexpect(html).not.toMatch(/<svg[^>]*viewBox="0 0 72 72"/)to target the actual 72px logo SVG, or drop the assertion entirely — thetoContain('<img src="...')check already fails if the page reverts to the old SVG.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Done. Dropped it, the doc lands in #83.
Done, with a test. Applied the same to Doist/todoist-cli#601 and Doist/automations#4827.
Done. It now fails on any inline 72px SVG. |
| import { LOGO_URI } from './auth-constants.js' | ||
|
|
||
| // The same PNG the OAuth consent screen shows, so the icon lives in one file. | ||
| const COMMS_CLI_ICON = `<img src="${LOGO_URI}" width="72" height="72" alt="" referrerpolicy="no-referrer">` |
There was a problem hiding this comment.
💭 The logo now depends on a network fetch from raw.githubusercontent.com. The error page is rendered precisely when auth failed — often due to no/blocked network — so this <img> (with alt="") will show nothing exactly when it's most likely needed. Networks that reach todoist.com but block GitHub raw would also get a broken logo on the success page.
The previous inline SVG rendered unconditionally. Consider keeping an inline SVG / data-URI fallback so the pages always show the icon offline.
There was a problem hiding this comment.
Keeping as-is to avoid one more place the icon needs updating. This page is only reached through the redirect from todoist.com, so the browser is online by then, and inlining the image would only help with performance. If we do inline it, it'd be great to generate it from the PNG automatically, e.g. with a GitHub Action.
3.6.1 renamed the icon to comms-cli_512px.png while 3.6.0 and earlier clients still use comms-cli.png, leaving two identical files. Point LOGO_URI and the README back at comms-cli.png and delete the copy. Clients registered by 3.6.1 to 3.6.3 will show Todoist's fallback icon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f97e02e to
3289c7d
Compare
## [3.6.5](v3.6.4...v3.6.5) (2026-10-20) ### Bug Fixes * show the current icon on the auth result pages ([#84](#84)) ([4800ad6](4800ad6))
|
🎉 This PR is included in version 3.6.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The local "You're connected" and "Authentication failed" pages had their own inline SVG copy of the old icon, so they still showed it after the refresh in #79. They now load
LOGO_URI, the PNG the consent screen already shows, so the icon lives in one file.Doistbot spotted this on the icon docs PR (#83).
It also points
LOGO_URIand the README back aticons/comms-cli.pngand deletesicons/comms-cli_512px.png, an identical copy left by #79. Clients first registered by 3.6.1 to 3.6.3 sent the_512pxURL, so their consent screen will show Todoist's fallback icon.Test plan
main, runtdc auth loginand approve.tdc auth loginand approve.Demo
🤖 Generated with Claude Code