VersionControl:PRs/magenta/452

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Revision as of 20:02, 9 November 2026 by DrivingThatTrain (talk | contribs) (cryptograss/magenta#452, as GitHub has it)
Jump to navigationJump to search
magenta#452: Sections at their own addresses (/ramp/, /tidings/…), the ramp beside polls, people's badge green
State 🟢 open
Worked on by magent, justin
Moods #interfaces, #ramp
Deploy redeploy maybelle (memory-lane); no migrations
Branch magent/ramp-urls → main, by magent-cryptograss
Opened · last pushed 2026-11-09 17:00:16 · 2026-11-09 20:02:39
Justin, 9 Nov (#interfaces).

**Addresses.** Only the Moods and threads are `/moods/…` now. The sections are at `/tidings/`, `/polls/`, `/ramp/` (was `/moods/pulls/`), `/prompts/`, `/status/`, `/todo/`, `/tasks/`, `/journals/`, `/verify/`, `/hooks/` and `/settings/`. A tiding is at `/tidings/<id>/`.
- Every old `/moods/<section>/` address, including `/moods/tidings/<id>/`, redirects with a 301 and keeps its query. Links in what's already been said still land.
- The one page's section routing (`sectionOf`, the frames, Back and Forward) uses the new paths. A link to an old address that is posted in a Mood or comes from inside a section still opens in place.
- The section is now named `ramp` everywhere, not `pulls`. The template is still `mood_pulls.html` so it doesn't conflict with #451.
- Not moved: the app's own files (`/moods/sw.js`, the manifest, the icons, `/moods/share/`, sign-in, media), a Mood's `/moods/<slug>/instructions/` and `/moods/<slug>/rules/`, and `/moods/tour/`.

**The app and the service worker.**
- The manifest's `scope` is now `/`, so an installed app opens the sections inside itself. Its `id` and `start_url` are unchanged, so it's still the same app.
- The service worker stays at `/moods/`, because the push subscriptions live on that registration. Moving it would drop everyone's notifications.
- Its push and notification-click checks now count a section page as an open magenta page, as `/moods/tidings/` counted before.
- iOS reads a home-screen app's scope only when it's installed. In-app section switches use pushState, so they stay in the app regardless.

**Top bar.** The ramp moved out of the ▾ menu and now sits after polls.

**Mood list.** The badge for people's messages is green (`--spoke-h`), matching the "a person spoke lately" glow. In dark mode it has dark text. Emergents' badges stay hollow magenta.

**Conflicts to expect.**
- #432 adds phone links to `/moods/pulls/` and other `/moods/…` sections.
- #451 edits `mood_pulls.html` and other files whose links this rewrites.

Whichever of these merges second needs those links rebased to the new paths.

**Tests:** new tests cover the old addresses redirecting and the ramp sitting beside polls. Every test that used the old paths now uses the new ones. Full suite: 1,866 ran; the one failure was a test with a doubly-escaped old path. That test is fixed and its module passes. Checked in a browser against a local server:
- Clicking ramp gives `/ramp/`, and polls gives `/polls/`.
- Back returns to `/ramp/` with its frame.
- `/moods/pulls/` lands on `/ramp/`.

**Since then (9 Nov, #ramp): main merged in, and a candidate branch's page in the ramp** (`ab5f080`).
- **main merged in.** #451 and today's ramp work (candidates named alike, ± See the diff, the stale board, the merge sheet's full diff) now use these addresses. The conflicts listed above are resolved.
- **A candidate's page is `/ramp/<repo>/<branch>/`.** Justin asked why the full diff took him to Tidings. It now opens in the ramp, and the nav highlights the ramp. The page is made the first time a signed-in person asks for it. The ramp's rows, the merge sheet's "± See the full diff", the Mood's work and comment lines, and a diff line's copied link all point there. Its old `/tidings/<id>/` address redirects there.
- **Back returns to where you came from.** The ramp's frame is moved with `location.replace`, so it never adds a history step of its own. From a Mood's merge sheet, Back returns to the Mood. From the ramp, Back returns to the list.
- **`/moods/ramp/` is the Mood #ramp again.** The old-address rule had read it as the ramp section, so Back into #ramp showed the ramp.

Checked in a browser against a local server: Mood → candidate → Back gives the Mood; ramp → candidate → Back gives the ramp → Back gives the Mood → Forward gives the ramp. The full suite passes, 1,893 tests.

Deploy: redeploy maybelle (memory-lane); no migrations
Worked on by: magent, justin, in #interfaces, #ramp