Skip to content

Fix view detection failing on ?noRedirect=1 URLs - #14

Merged
taoshotaro merged 2 commits into
mainfrom
fix/view-detection-with-query-params
Aug 12, 2026
Merged

taoshotaro merged 2 commits into
mainfrom
fix/view-detection-with-query-params

Conversation

@taoshotaro

@taoshotaro taoshotaro commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Custom View URLs ending in ?noRedirect=1 (e.g. /view/cycle-planning-backlog-30beca7f44e5?noRedirect=1) were not detected: the view-id regex anchored the hex id to end-of-string ($), so the Whiteboard button never injected and the popup reported "not a Custom View".
  • Changed the pattern to /\/view\/.*?-([a-f0-9]+)(?:\?noRedirect=1)?$/ so the id still matches with that param appended.
  • Applied in both places the regex is duplicated: extractViewId in src/lib/storage.ts (popup + whiteboard) and getWhiteboardUrl in src/content/inject-button.ts (button injection).

Only ?noRedirect=1 is tolerated, deliberately. Params that actually affect what the view shows (?filter=...) still fail detection instead of being silently dropped — the whiteboard fetches the view by id, so those params have no effect on the board today. Keeping them un-detected leaves the door open to forwarding them properly later rather than quietly ignoring them.

Test plan

  • Regex verified against: plain view URL and ?noRedirect=1 (id extracted); ?filter=xxx, ?noRedirect=1&filter=x, #frag, and non-view URLs (null)
  • npm run build (incl. tsc --noEmit) passes
  • Loaded the unpacked build in Chrome: Whiteboard button appears on a ?noRedirect=1 view URL and opens the board

@taoshotaro
taoshotaro marked this pull request as ready for review July 13, 2026 05:16
@taoshotaro
taoshotaro requested a review from fortkle July 13, 2026 05:16
The previous fix let the view id match before any query string, which
would silently drop params like ?filter=. Those should eventually be
forwarded to the whiteboard, so keep them failing detection loudly and
allow only ?noRedirect=1.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@taoshotaro taoshotaro changed the title Fix view detection failing on URLs with query parameters Fix view detection failing on ?noRedirect=1 URLs Aug 3, 2026
@taoshotaro
taoshotaro merged commit 6212856 into main Aug 12, 2026
@taoshotaro
taoshotaro deleted the fix/view-detection-with-query-params branch August 12, 2026 02:44
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.

1 participant