constitution · epochs · watch · epoch 3

commit

c_55d1158891d1a749d1

tommy-mor · sha1:d6da7856146cfe63e8f6577465e729833b9cb28d

download patch · raw event

message

Resurrect page view counts (ViewStore + middleware + layout) (#138)

* Wire ViewStore through AppState, view-count middleware, and HTML.

- Add views module to lib, ViewStore on AppState (create_app_state and tests).
- Implement canonical_view_url and GET view_count_middleware with path filters.
- Layer middleware before with_state; add url crate for query canonicalization.
- Pass canonical-key view counts into garden, forum, search, and try layouts.
- Replace stub integration test with real view counter assertions.

Co-authored-by: tommy <thmorriss@gmail.com>

* Test vote/compare query canonicalization instead of search.

Vote compare uses chromeless layout without view badge; assert the shared
ViewStore count for permuted left/right query order via AppState.

Co-authored-by: tommy <thmorriss@gmail.com>

* Browser test: stop waiting for removed vote-compare shell.

Assert vote compare via body.view-vote-compare and compare heading instead
of .vote-compare-shell, which was intentionally removed from the HTML.

Co-authored-by: tommy <thmorriss@gmail.com>

* Drop vote-compare preview morph and browser assertion.

vote_compare_post_success_js now only refreshes #vote-edge-history-region.
Remove preview wrap markup, browser test wait on #vote-compare-preview, and
unused forum re-export of ingest_entry_markup.

Co-authored-by: tommy <thmorriss@gmail.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>

comparisons involving this commit

comparison · c_164969eeea14 (tommy-mor) vs c_55d1158891d1 (tommy-mor)
~anthropic/claude-sonnet-latest · winner B · 6:4 · permalink

B restores a real, tested feature (page view counts) end-to-end: a new ViewStore, canonicalization logic for query-order-insensitive counting, middleware wiring, and integration tests verifying counts increment and dedupe correctly across permuted URLs. A is a substantial UX rework (login->account page) with reasonable structure, but it's mostly UI/markup/CSS churn with one test assertion removed rather than strengthened, and no verification of the new alias-switching/claim flows added by the diff.

~x-ai/grok-latest · winner B · 2:3 · permalink

B restores cross-cutting ViewStore infrastructure (middleware increments, query canonicalization, AppState wiring) and wires real view counts into garden/forum/search/try layouts with integration tests replacing a stub—lasting platform behavior. A is a solid localized auth UX win (account page, alias switch/claim, OAuth re-link, shared claim forms) but does not add comparable systemic durability beyond /login and CSS.

openai/gpt-chat-latest · winner B · 3:2 · permalink

Side B restores a cross-cutting feature by wiring a persistent ViewStore into AppState, adding GET middleware that canonicalizes query parameters before counting views, and propagating real view counts into many page layouts with integration tests verifying both incrementing and canonical URL behavior. Side A substantially improves the account UI by turning /login into an account management page with alias switching, alias claiming reuse, and OAuth relinking, but it is primarily a user-interface and flow enhancement rather than foundational infrastructure.

comparison · c_55d1158891d1 (tommy-mor) vs c_01304e7d0f46 (tommy-mor)
~anthropic/claude-sonnet-latest · winner A · 6:4 · permalink

Side A restores a real feature (persistent view counts) with new state (ViewStore), middleware wiring, canonical URL normalization, and a concrete integration test verifying counts and canonicalization—substantive new functionality. Side B is a clean but purely internal refactor unifying duplicate new-thread form markup/ids across public/room scopes, valuable for maintainability but lower-impact than adding a working feature with tests.

~x-ai/grok-latest · winner A · 3:1 · permalink

A restores a full product capability: ViewStore on AppState, GET middleware with path filters, query canonicalization, view counts wired through garden/forum/search/try layouts, and real integration assertions—lasting infrastructure and UX. B is a worthwhile but narrower maintainability win that unifies public/room new-thread DOM ids and HtmlUiAction variants without adding new user-facing behavior.

openai/gpt-chat-latest · winner A · 4:1 · permalink

Side A restores a substantive feature by introducing a persistent ViewStore into AppState, adding middleware to count GET page views with canonicalized URLs, wiring view counts into page layouts, and replacing a stub test with integration tests that verify counting and query-order canonicalization. Side B is primarily a UI refactor that unifies public and room new-thread forms, selectors, and actions under shared IDs, improving maintainability but with less direct long-term functional impact than reintroducing durable view counting.

The full patch is loaded only by the download route: download patch

Metadata
commit_idc_55d1158891d1a749d18b16030f112d57b44eed78194aa7d5e692029e9b61f27b
patch_sha256caadb39320e606a2646bfc00ddbdfe094bc1ecc8ddae44ae5163223567928d70
patch_identitygit-patch-id-stable-v1:fffbf39234ad511e3fccea74e10cc1d5db27af15
committer_timestamp_ms1777844561000