Skip to content

Phone page tests: session views open in the fake browser - #31

Merged
ghosthack merged 1 commit into
mainfrom
page-test-fake
Nov 22, 2026
Merged

ghosthack merged 1 commit into
mainfrom
page-test-fake

Conversation

@ghosthack

Copy link
Copy Markdown
Owner

The fake browser in the page script's unit tests stored location.hash without its #. The page drops the first character of the hash, so a route to s=mhm-a ended up on the list, and no unit test ever reached a session view.

  • The fake's hash now reads with its #, as Safari's does. It also gains a canvas that measures text, which the session view uses to size itself.

  • One test expected the old, wrong hash; it's updated.

  • New tests cover a session opened:

    • by a link;
    • from the list (titled by its display name);
    • right after New (titled by the name given in the form).

    The last one fails without the title fix from Move the Swift port to its own repo, microhm-appkit #30.

Page tests: 51/51.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VwoQ7n4KEAVgw3HjEDfxga

…session views open

The fake kept location.hash without its "#", and the page drops the first character, so
no unit test ever reached a session view: "s=mhm-a" routed to the list. It now reads
with the "#", as Safari's does, and has a canvas that measures text. With that, tests
cover a session opened by a link, from the list, and right after New.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VwoQ7n4KEAVgw3HjEDfxga
@ghosthack
ghosthack merged commit f2d23cb into main Nov 22, 2026
3 checks passed
@ghosthack
ghosthack deleted the page-test-fake branch November 27, 2026 04:54
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