news: the adventure page gets something that's actually happening
Every dispatch Pete publishes is an accomplishment — a death, a clear, a milestone — and an accomplishment is a newspaper clipping the moment it lands. No refresh interval fixes that. So the page never felt alive, and it never was going to. The board is the other kind of thing: state that is currently true. gogobee pushes the whole roster, we replace ours with it, and it renders above the clippings. An open tab re-polls so it keeps telling the truth. Replace, never merge: anyone gogobee omits (opted out, no character) drops off the public page. That omission IS the opt-out — a standing row showing class, level and zone names the player anyway, so "an adventurer" would have been a fig leaf. The snapshot time lives in its own row, because an empty board is ambiguous: nobody playing, or gogobee stopped talking to us. The page has to tell those apart — one is a quiet realm, the other is a board that lies confidently, which is worse than one that admits it lost the wire. Also teaches Pete "departure", so a bored adventurer letting itself out is news.
This commit is contained in:
@@ -119,6 +119,13 @@ type channelPage struct {
|
||||
PrevURL string
|
||||
NextURL string
|
||||
Total int
|
||||
|
||||
// Roster is the live adventurer board, populated on the adventure section
|
||||
// only and only on page 1 — it is present tense, and page 2 of an archive is
|
||||
// not where anyone looks for what's happening right now.
|
||||
Roster []RosterView
|
||||
RosterStale bool
|
||||
ShowRoster bool
|
||||
}
|
||||
|
||||
type indexPage struct {
|
||||
@@ -343,6 +350,10 @@ func (s *Server) handleChannel(w http.ResponseWriter, r *http.Request, ch Channe
|
||||
NextURL: fmt.Sprintf("/%s?page=%d", ch.Slug, page+1),
|
||||
Total: total,
|
||||
}
|
||||
if ch.Slug == "adventure" && page == 1 {
|
||||
data.Roster, data.RosterStale, _ = s.roster()
|
||||
data.ShowRoster = true
|
||||
}
|
||||
s.render(w, "channel", data)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user