Skip to content

Fix redundant profile link, offline handling, screenshot drift, and add Save cats - #74

Merged
BrandonML merged 13 commits into
mainfrom
dev
Sep 25, 2026
Merged

BrandonML merged 13 commits into
mainfrom
dev

Conversation

@BrandonML

Copy link
Copy Markdown
Owner

Summary

Bundles four issues into one PR per dev-branch convention (multiple ready branches merged into dev, then one PR to main):

Test plan

  • npm run lint clean
  • node --test — 256/256 pass (full suite; several of these changes touch shared rendering paths)
  • Manual QA: rendered the real markup via a local static server + Chrome DevTools viewport emulation — confirmed the redundant-link fix, offline notices, the regenerated screenshot harness output, and the save/unsave heart toggle + Saved cats page end-to-end (save, remove, link-redundancy parity, empty state)

Closes #51, Closes #69, Closes #66, Closes #43

🤖 Generated with Claude Code

BrandonML and others added 8 commits September 25, 2026 12:15
Issue #51: ~85% of orgs don't configure a per-animal profile URL, so
rescueUrl and profileUrl end up pointing at the exact same page --
either via rescueUrl's own profileUrl fallback, or because the org's
"animal profile" URL from RescueGroups is just its own homepage.
Showing two links to the same destination read as a mistake.

When the two URLs match, the rescue name now renders as plain text
and "View profile" (the styled action button, already what feeds the
share flow) stays as the single link. When they genuinely differ,
both still show as before.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Issue #69: a genuine network outage previously surfaced whatever
message that context normally shows for an unrelated failure -- "That
photo is no longer available" for an image that just can't be
fetched, "Try updating your zip code" for a refresh that never left
the machine. navigator.onLine === false is checked first in all three
places a network failure can surface (photo load, background refresh,
explore) and gets one clear, dedicated message instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…enerate screenshots

Issue #66: screenshot-frame.source.html / screenshot-frame-options.source.html
hand-copied newtab.html/options.html's <main class="shell"> markup for
capture purposes. That copy went stale when the header switched to icon
buttons (#55/#63) and was never updated, so all 6 shipped screenshots
showed a header that no longer matches the real product.

Both harnesses now fetch the real newtab.html/options.html at capture
time and inject the actual <main class="shell"> markup into .stage,
instead of a hand copy -- the real newtab.js/options.js module script
is only appended once that injection completes, since it queries the
DOM on load. This can't drift out of sync again: whatever the real
HTML's body contains is exactly what gets captured.

Regenerated all 6 screenshots (1280x800, via Chrome DevTools' exact
viewport emulation against a local static server) to reflect the
current icon-button header. No listing copy changes -- out of scope
per the issue.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…page

Issue #43: lets a user save a cat they're interested in before it
disappears behind the next new-tab refresh. A heart-shaped toggle
overlays the top-right of each card's photo (empty outline = unsaved,
filled red = saved); a new 4th header icon opens a dedicated Saved
cats page (extension/saved.html/.js, mirroring the existing FAQ page's
structure) listing everything saved, most-recent-first, each with a
Remove button. Saved cats apply the same rescue/profile link-
redundancy handling as the main card (issue #51).

A snapshot (name, photo, rescue/profile links, fee, etc.) is stored at
save time rather than just the id, so a saved cat's card still renders
correctly even after it's adopted or drops out of the live feed.

Storage is chrome.storage.local, not .sync -- see the new "Saved cats
storage" section in README.md for why: WEBSTORE.md's Permissions
Justification table explicitly promises reviewers Tabby never uses
chrome.storage.sync, and switching would be a real privacy-posture
change, not just a code choice. No new manifest permission needed
either way ("storage" already covers both local and sync namespaces).

Also updates WEBSTORE.md's storage justification and feature list, and
adds an FAQ entry, since this is user-visible behavior.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@BrandonML BrandonML mentioned this pull request Sep 25, 2026
BrandonML and others added 5 commits September 25, 2026 14:42
…cal-storage messaging

Follow-up polish on #43 from manual browser testing:

- Saved-cat thumbnails grow from 64px to 96px -- a clear step up
  without the list feeling like a photo grid.
- Clicking a saved cat's thumbnail opens its original-resolution photo
  (card.originalImageUrl, already available from RescueGroups but not
  previously carried into the saved snapshot) in a small hand-built
  lightbox overlay -- no external library, dismissible via the close
  button, clicking outside the image, or Escape.
- Saved cats' intro paragraph now says plainly that saves are local to
  this device, not backed up anywhere. The matching FAQ entry bolds
  that same point and spells out what actually clears it (uninstalling
  Tabby, or "Clear browsing data" with site data included).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Two more #43 follow-ups from review:

- The saved-photo thumbnail button now carries a title/aria-label
  ("Click to see a larger photo of <name>") so hovering it tells
  sighted mouse users what clicking does, not just screen readers.
- The header's "Saved cats" heart icon recolors to the same red as a
  saved card's heart once at least one cat is saved (.icon-btn.has-saved,
  via currentColor -- no change to the icon's shape, so it doesn't
  read as a pressed toggle, since it's just navigation). Checked on
  page load and refreshed after every save/unsave.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Audited the full main...dev diff against its tests before the v2.4.0
release. Found two real gaps, both logic that already had a tested
sibling elsewhere but wasn't itself covered:

- The header's new #saved button (opens saved.html) had no test,
  unlike #faq right next to it doing the identical
  tabs.update/no-active-tab dance.
- saved.js's back-to-tabby handler is a straight copy of faq.js's, but
  only faq.test.js covered the "no active tab -> window.close()"
  fallback branch.

Everything else in today's changes (offline handling at all three call
sites, the #51 link-redundancy logic in both newtab.js and saved.js,
the save/unsave toggle and header indicator, the lightbox, the
screenshot harness) already had direct test coverage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@BrandonML
BrandonML merged commit 3fbac28 into main Sep 25, 2026
2 checks passed
@BrandonML BrandonML mentioned this pull request Sep 25, 2026
2 tasks done
@BrandonML
BrandonML deleted the dev branch September 25, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant