gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitc87149e8c87149e8tests/warmstart.mjs: the progressive start proven over HTTP (note in the window, 503 short id, after: everything); bootBeginmrec87149e8/components/genre.hl

2.8 KB

  1. // components/genre.hl — `/genres/:genre`, `/genres/:genre/page/:page` (mission 058, tracker.worldapi.org#25): the /movies and
  2. // /shows list narrowed to one genre — its movies AND series together, newest first (catalog.hl genre lists: a movie by its
  3. // release, a series by its newest released episode), 24 per page, poster + title (+ year), adult titles hidden like there.
  4. // The creator: "/genres/:genre pages look like the shows and movies list page just narrowed to their genre but show both
  5. // movies and shows with that genre". The genre pills on a show page link here (`/genre/<x>` answers 301 to it, project.hl).
  6. // The grid and the pagination: components/tilelist.hl.
  7. parent './main.hl'
  8. import TileList from './tilelist.hl'
  9. import { appTitle } from '../project.hl'
  10. import { genreBySlug } from '../lib/shows.hl'
  11. import { genrePage, genreCount } from '../lib/catalog.hl'
  12. import { warmReady, warmText } from '../lib/warm.hl'
  13. // static: an mpackdb-backed helper must be `static` (hybriel#115/#116)
  14. static genreOf = (&slug) => { return genreBySlug(slug) }
  15. static listingOf = (&g, &raw) => { return g != null ? genrePage(g.id, raw) : { page = 1 pages = 1 tiles = [] } }
  16. static countOf = (&g) => { return g != null ? genreCount(g.id) : 0 }
  17. genre = null
  18. page = null
  19. genreRow = genreOf(genre)
  20. found = genreRow != null
  21. notFound = genreRow == null
  22. name = found ? genreRow.name : ''
  23. listing = listingOf(genreRow, page)
  24. tiles = listing.tiles
  25. pageNo = listing.page
  26. pageCount = listing.pages
  27. total = countOf(genreRow)
  28. countText = total + (total == 1 ? ' title' : ' titles') + ', newest first · page ' + pageNo + ' of ' + pageCount
  29. hasTiles = total > 0
  30. noTiles = found && total == 0
  31. basePath = found ? '/genres/' + genreRow.urlSegment : '/genres'
  32. __title = found ? (pageNo > 1 ? name + ', page ' + pageNo + ' — ' + appTitle : name + ' — ' + appTitle) : appTitle
  33. // mission T17 (boot time): the server listens while bootscan.hl still builds the lists / slug maps / search index (lib/warm.hl); until the 'catalog'
  34. // stage is there this page says so instead of showing half a map
  35. warming = !warmReady('catalog')
  36. warmNote = warming ? warmText() : ''
  37. View {
  38. listPage { id = "genre-page"
  39. if (warming) { p { id = "warming" class = "message banner" warmNote } }
  40. if (notFound) {
  41. h1 { "Not found" }
  42. p { "This genre doesn't exist." }
  43. }
  44. // tracker.worldapi.org#20: "Genre | Action", the type word in the genre colour, the name white
  45. if (found) { h1 { class = "typed" typeWord { class = "type-word type-genre" "Genre" } typeSep { "|" } typeName { name } } }
  46. if (noTiles) { p { class = "muted" "Nothing in this genre yet." } }
  47. if (hasTiles) { p { class = "muted list-count" countText } }
  48. // always there (no `if` around a composed component, like /movies): empty for an unknown genre, no pager on one page
  49. TileList { tiles = tiles page = pageNo pages = pageCount basePath = basePath }
  50. }
  51. }

Branches

Latest commits

  • c87149e8tests/warmstart.mjs: the progressive start proven over HTTP (note in the window, 503 short id, after: everything); bootBeginmre
  • 593a6350boot: resumable start-up scan, the server listens first (T17)mre
  • be4890a0reports: H2 hydration audit (no test change needed)mre
  • 1f9c8bf4re-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
  • c1df88eddocker-compose: HL_GC_TABLE_LOAD=62 (tracker mission 048, T16 real-data numbers)mre
  • d0a82867mission 048: report, LOG (HL_GC_TABLE_LOAD=62 measured)mre
  • 2d4be66fre-vendor Hybriel 5df4eb7e (GC: HL_GC_TABLE_LOAD knob, mission 406)mre
  • 99e7c8b9tests: realdata-m035-radii, repro-t38, realdata-060-backfill ports from env (REAL_PORT, REAL_CHROME, REPRO_CHROME), defaults unchangedmre
  • 4625aa22re-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
  • a6dfd6ecdeploy: person-lookup gate (tracker#46)mre
  • 33ad4bd5Merge commit 'f57f64f'mre
  • 7d38cec4docker-compose: nofile 65536 (default soft 1024 refused boot: errno 24 in fs.listDir, Hybriel 528bc89f)mre
  • f57f64f0mission 046: report, LOGmre
  • 5965963adeploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
  • efe1b485mission 046: re-vendor Hybriel master 60b2817b (integration 8, #203): plugins mpackdb + web (bin/ git-ignored: hybriel, libhlrt.a, hlc.o, hlrt/ from native/zig-out)mre
  • 53099ffbmission 046: person page reads a slim per-title credit row cache (no whole-record fetch per credit); gate tests/person-lookup.mjsmre
  • 9b3828aemission 046a: report, LOGmre
  • 4b37356emission 046: franchise seed supersedeCollections reads the curated timelines once (10 s one-tick block at the end of boot)mre
  • ac6268e3mission 046a: re-vendor Hybriel 528bc89f (integration 6): plugins mpackdb/time/web (bin/ git-ignored)mre
  • 322b3293mission 046: photoQueue guard for non-row fetch results (damaged persons index)mre