Skip to content

explore: the cities you built come first, marked "yours" - #17

Merged
azank1 merged 1 commit into
mainfrom
feat/yours-first
Oct 19, 2026
Merged

azank1 merged 1 commit into
mainfrom
feat/yours-first

Conversation

@azank1

@azank1 azank1 commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Someone who built a city couldn't find it afterwards. It was in the gallery, but under the featured cities: past the two rows the home page shows, and after the ten-city Featured shelf on /explore.

What changes

  • s/city.js keeps the last 24 cities this browser built in localStorage (cc.mine), each as a gallery entry, when a build finishes.
  • s/site.js puts those cities, plus your own city when you're signed in, first in the gallery list, marked mine. Tiles marked mine get a "yours · person/org/repo" badge. If the gallery has a newer copy of a city, that copy is used. A city that has fallen out of the gallery's 60 latest builds still shows, from the browser's copy.
  • Home: with the default "Featured first" sort, your cities lead the two rows. Other sorts still badge them.
  • /explore: a Yours shelf above Featured. Each city appears on one shelf only.
  • Visitors who haven't built anything and aren't signed in see the same page as before.
  • /about, Privacy: the list stays in the browser.

Also fixes #15's edit. web/public/*.html is generated by web/scripts/site.mjs from web/site/. #15 edited only the generated index.html, so CI's viewer job (committed builds are up to date) has failed since 5d37aae. The section swap is now in web/site/index.html. Running node viewer/build.mjs and then node web/scripts/site.mjs leaves the tree clean. The regenerated pages also pick up new ?v= hashes for site.css and site.js.

Evidence

  • Web suite: 63 pass, 0 fail. Typecheck is clean. node --check passes on both scripts.
  • remember() was run in Node three times (repeat key, missing who, zero commits). The result was newest first with no duplicates, and shares of 0 instead of NaN.
  • Local headless screenshots used the dev server with a copy of the live gallery:
    • With a seeded list (one city in the gallery, one not), /explore shows Yours (2) → Featured (10) → Fresh, and the home grid leads with both "yours" tiles. The 400 px layout stacks cleanly.
    • With a fresh profile, /explore starts at Featured as before, 30 cities.
  • Not tested end to end: a real build writing the list on production. That needs a live build after deploy.

A city built from a browser was listed in the gallery but sat below the
featured cities: under two rows on the home page and the ten-city Featured
shelf on /explore, so whoever built it couldn't find it.

city.js now keeps the last 24 cities this browser built in localStorage.
site.js puts them, and your own city when signed in, first in the gallery
list with a "yours" badge. /explore gets a Yours shelf above Featured. A
city that has fallen out of the gallery's 60 latest builds still shows,
from the browser's copy. Visitors who haven't built anything see the same
page as before. The privacy section says the list stays in the browser.

Also moves #15's section swap into web/site/index.html, the source that
web/scripts/site.mjs stamps the page from. #15 edited only the generated
page, so CI's "committed builds are up to date" check has failed since.
@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
commit-city Ready Ready Preview Oct 19, 2026 2:42pm UTC

@azank1
azank1 marked this pull request as ready for review October 19, 2026 16:48
@azank1
azank1 merged commit 73f492c into main Oct 19, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
Preview — 8d10168f Deployed Oct 19, 2026 by vercel[bot]
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