Feature plan: Step 1 · Step 2 · Step 3 · Step 4

Layered interface: Step 1 solution assessment

Original Query

Okay. Let's work on the layered interface, please. I feel like that's the real wow for MIT Rap Club. Can you clone Pollyanna and review how it's implemented there? What can we learn from there, and what mistakes can we not repeat, perhaps? I don't know if you'll be able to find any mistakes in my code, but maybe anything that seems like a mistake.

Later in the same conversation: cookies are okay for the layer setting. The setting lives in both a cookie and localStorage on purpose: the cookie lets the page start in the right layer, and localStorage is more durable in some browsers and lets every open tab switch modes within about a second. The switch should sit slightly out of the way, so a technical person notices it and others don't, and it can be a little humorous: a small π in the bottom-right corner, like in The Net. The help answer can be "Did you click the π?"

Also from the conversation: without JavaScript, Pollyanna first shows only the base and beginner layers. A no-JavaScript button just sets the cookie, which is another reason for the cookie, and the served pages then flip.

Understood Intent

Give mitrapclub.com a small first view and let curious people reveal the rest. A new member should see only what the Friday meeting needs. Anyone who finds the π gets the full v3 board.

Problem

A first-time visitor to mitrapclub.com sees the whole v3 interface, so the club's simple purpose gets lost.

What Pollyanna teaches

Keep:

  • Layers are plain class names, so any template can opt in without configuration.

  • The defaults are beginner on and advanced off.

  • A local More opens hidden parts of one section only.

Don't repeat:

  • ShowAdvanced() in settings.js hides elements one by one with inline styles and special cases for table rows and cells.

  • The More/Less link reads its own innerHTML, accesskey markup included, to know its state.

  • Nested spans express "advanced and beginner", which reads unclearly in the templates.

  • Tabs learn about a change by polling in the event loop.

  • The code copies the setting into a cookie but never says why.

Concepts touched

Site profile, page theme, no-script presentation, music section, feature flags. Possibly new: layer setting.

Every visitor gets the same cached page. The page links one tiny stylesheet, /layer.css, which the server answers from the layer cookie. With no cookie, it hides advanced parts, so everyone starts in the basic view, scripts or not. The π is a plain link that sets the cookie and returns to the same page, so it works without JavaScript, as Pollyanna's button does. With scripts, the π switches instantly instead, writes both copies, and a storage listener switches other tabs, as member_approval.js already does. A head script, like the existing theme script in layout.php, reconciles the two copies before paint.

  • Pro: no-script visitors get the basic view and can still reach everything.

  • Pro: static publication and high-traffic caching keep working, because only /layer.css varies.

  • Con: one extra small request per page; it must never be cached across visitors.

— Claude · 2026-12-04 UTC — Revised by Claude · 2026-12-04 UTC (no-script behavior follows Pollyanna, per Ilya)

The server reads the layer cookie on every page and adds the hiding rules into the HTML, as Pollyanna's route.php does.

  • Pro: no extra request, and no-script visitors get the basic view.

  • Con: every page varies by cookie, which breaks static publication and cached pages.

— Claude · 2026-12-04 UTC

Option C: Port Pollyanna's script as is

Copy ShowAdvanced() and its preferences into a v3 asset.

  • Pro: fastest; the behavior is already known.

  • Con: carries over every mistake listed above.

— Claude · 2026-12-04 UTC

Recommendation

Option A. It keeps Pollyanna's no-script behavior without giving up v3's cached pages. Build it as a general v3 feature behind a feature flag, turned on only by the mitrapclub site profile. Start with two layers, basic and advanced. The basic view shows the tracks queue, the share box and the next meeting. Also record in code why the setting lives in both places. On load, the more recently written copy wins and the other is corrected, because iPhone Safari clears localStorage after about seven days without a visit while the cookie remains. The slice fits one cycle.

Open questions for Step 2:

  1. Is a third "member" layer needed now, or later?

  2. Which nav items count as basic on mitrapclub?

  3. The status bar is hidden from screen readers; the π needs a keyboard-reachable home of its own.

— Claude · 2026-12-04 UTC

Approval

Approved Step 1 on 2026-12-04 by Ilya, by voice while driving ("for now you can approve it"). He plans to review the document later; revisions stay open until Step 2 approval.