Skip to content

fix: stop Lens subtabs animating the window - #14

Merged
oddharsh merged 1 commit into
mainfrom
codex/fix-lens-subtab-transition
Jul 17, 2026
Merged

oddharsh merged 1 commit into
mainfrom
codex/fix-lens-subtab-transition

Conversation

@oddharsh

Copy link
Copy Markdown
Owner

No description provided.

@oddharsh
oddharsh merged commit fb77156 into main Jul 17, 2026
4 checks passed
@oddharsh
oddharsh deleted the codex/fix-lens-subtab-transition branch July 17, 2026 17:42
oddharsh added a commit that referenced this pull request Jul 28, 2026
* fix(social): endpoint discovery was taking three of the decoys

Ran the site's sender against the IndieWeb conformance suite at
webmention.rocks, which plants deliberate traps in its 23 discovery
pages. Three of them caught us. All three were the same shape: the
parser was matching on text rather than on structure.

  #12  rel="not-webmention"       took the decoy
  #13  decoy inside <!-- -->      took the decoy
  #20  <link rel="webmention">    gave up instead of reading on

12 is the sharp one. The old test was /\bwebmention\b/, and "-" is a
word boundary, so "not-webmention" matched. rel is a space-separated
token list, so the check is now tokenize-and-compare, in the header path
too. 13 needed comments stripped before the scan (escaped HTML in #14
was already safe, since these patterns want a literal "<"). 20 was
treating the first rel=webmention tag as the answer even with no href,
so a bare <link> shadowed the real <a> further down; it now skips
candidates without an href and keeps looking. href="" is deliberately
NOT that case: it is a legal self-reference, and #15 asserts it.

Kept the single document-order scan. Tempting to look at every <link>
before any <a>, but #16 exists precisely to punish that: it puts the
real endpoint in an <a> and a decoy in a later <link>.

23/23 against the live suite now, up from 20. Frozen as fixtures rather
than live fetches, because this file is deliberately network-free.
Confirmed the fixtures fail against the old parser.

discoverEndpoint is exported to make the suite runnable, matching the
other helpers here that are already exported for tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(social): a real mention arrived reading like spam, twice over

Drove an actual webmention through the deployed receiver from a public
source page. It verified and stored correctly, but the moderation email
was 280 characters of SVG path geometry:

  9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018…"> A
  throwaway source page. It exists to drive one real w

Two causes, either of which is enough on its own.

<svg> was not stripped alongside <script> and <style>, and a page like a
GitHub gist is full of inline icons. On its own that is survivable, since
the tag stripper removes complete tags with their attributes.

What made it escape is the excerpt window. It is a fixed 400 characters
either side of the target, cut at a byte offset, and the target lives
inside an href — so centring on a link GUARANTEES the cut lands mid-tag,
and often mid-attribute. A leading partial tag is not a complete tag, so
the stripper leaves it as text. That is the stray "> in the middle.

Now strips <svg>/<noscript> and drops the partial tags at both edges,
detecting a mid-tag cut by whether > precedes < in the slice. Same page
now yields the actual sentence around the link.

Also fixes two things found alongside it:

202 no longer carries a Location header. The spec ties Location to 201,
where it names a status URL the sender can poll; webmention.rocks
receiver test #1 fails a 202 that sends one. /inbox was never a status
URL for a pending mention anyway, since a pending mention deliberately
does not appear there.

Citations now skip anchors that exist to open a hover card: interestfor
on the garage pages, class="car-link" on the homepage. Every one of them
points at a Google SEARCH url, so telling google.com/search?q=Singer it
had been cited is noise, not credit. Live citation targets drop 56 -> 53,
and all three removed are search pages.

Verified the excerpt test fails with both fixes removed, reproducing the
exact garbage above. Each fix alone is sufficient, so it takes removing
both to break it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Aadharsh Pannirselvam <19518661+oddharsh@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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