tickets
All repositories: gitoria
3.0 KB
// components/inbox.hl — `/inbox` (ticket #20): the tickets ASSIGNED TO YOU, in two lists: pending and// review, across all projects. Personal: needs a login. Live: a ticket assigned to you, or moving into// or out of those states, appears / disappears without a reload.parent './main.hl'import { inboxRows } from '../lib/tickets.hl'import { siteName } from '../project.hl'import { userOfSession } from '../lib/users.hl'session = nullmyId = userOfSession(session) != null ? userOfSession(session).id : ''loggedIn = myId != ''loggedOut = myId == ''box = inboxRows(userOfSession(session))pending = box.pendingreview = box.reviewnoPending = pending.length == 0noReview = review.length == 0__title = siteName + ' | inbox'View {ticketBoard {h1 { id = "heading" "Inbox" }if (loggedOut) { p { id = "loginhint" class = "hint" "Log in with ident (top right) to see the tickets assigned to you." } }if (loggedIn) {section { id = "reviewbox"h2 { "Review" }if (noReview) { p { id = "reviewempty" class = "empty" "Nothing is waiting for your review." } }ol { id = "review" class = "tickets"for (row of review) {li {ticketState { class = row.stateSlug row.state }a { class = "subject" href = row.href ticketRef { row.ref } row.subject }ticketMeta {a { href = row.projectHref row.projectTitle }time { row.updated }}}}}}section { id = "pendingbox"h2 { "Pending" }if (noPending) { p { id = "pendingempty" class = "empty" "Nothing is pending for you." } }ol { id = "pending" class = "tickets"for (row of pending) {li {ticketState { class = row.stateSlug row.state }a { class = "subject" href = row.href ticketRef { row.ref } row.subject }ticketMeta {a { href = row.projectHref row.projectTitle }time { row.updated }}}}}}}}}// a row goes to the top of its list if it is assigned to me and in that state, and out of both otherwiseplace = (row) => {p = []r = []if (row.assigneeId == myId && row.state == 'pending') { p.push(row) }if (row.assigneeId == myId && row.state == 'review') { r.push(row) }for (x of pending) { if (x.id != row.id) { p.push(x) } }for (x of review) { if (x.id != row.id) { r.push(x) } }pending = preview = rnoPending = p.length == 0noReview = r.length == 0}on client ticketCreated(row) { place(row) }on client ticketEvent(ticketId, ev, row) { place(row) }on client signedIn(tag, info) {b = emit server myInbox()if (b != null && b.pending != null) {pending = b.pendingreview = b.reviewnoPending = b.pending.length == 0noReview = b.review.length == 0myId = b.meloggedIn = trueloggedOut = false}}on client signedOut(tag) {myId = ''loggedIn = falseloggedOut = true}on server myInbox(session) {u = userOfSession(session)if (u == null) { return { error = 'log in first' } }b = inboxRows(u)return { pending = b.pending review = b.review me = u.id }}
Branches
- mainmain branch
Latest commits
- a75e0279mission 010 (code order) 3/4: let only where a variable is reassigned or re-bound in a loop body (456 lets → plain declarations; Hybriel refuses a plain declaration inside a loop on its 2nd pass). gate 249/0, connect 60/0, real-data reads identical, a 50-step write sequence (API + faces) identical to the old codemre
- e9d5c618mission 010 (code order) 2/4: one lib/ file per topic — store.hl split into projects / tickets (+ relations) / events / tickets-helpers, util.hl shared helpers (env, storage dir, URLs, sorts, Vienna time), the function routes out of project.hl into lib/api.hl (thin; auth/filters/Accept in api-helpers.hl), invite + member-removal logic out of the faces/routes into invites.hl / tickets.hl; project.hl is the map. /login/callback gets req + the session store by reference. gate 249/0, connect 60/0, real-data reads identicalmre
- 97e269b5mission 010 (code order) 1/4: .hl files out of the root — lib/ (store, users, connections, invites, migrate, markdown, mdview, import = ticketfile, util = localtime, jsoncheck, api-helpers = api), tools/import.hl, components/styles.hl; import paths only. gate 249/0, connect 60/0, real-data reads identicalmre
- 38f9d10ftickets: Hybriel master 06617221 (plugin allocators 3a781359 + 413f60e4, mpackdb 2cb7ae5e, http1 773de63e); gate 249/0, connect 60/0mre
- d3db6139tickets: Hybriel master 190aa11d (fc838894 GC correctness, #126 closure scopes, #127); gate 249/0, connect 60/0mre
- bce182e3tickets: Hybriel master 7eea0d32 (#126 memory, #48 lambda copies its argument); migrate.hl lambdas take &logmre
- 4137be0fantcolony#40: mission references point to the moved missionsmre
- 9bfba36aantcolony#40: history (LOG.md), worker briefs (missions/) and reports moved here from antcolony, numbered per project; old numbers in antcolony docs/mission-map.mdmre
- c7bd2645tickets: Hybriel master 73267707 (#122 fixed); compactNow workaround removed (#110 covered)mre
- 2ab91ee9tickets: gate checks rows appear once (session sync); re-vendor to ff51cf46 stopped on hybriel#122, stays 837fe120mre
- e01c2b1dtickets#24: installable app (manifest, service worker, offline list), own icon; gate waits for the hello's pongmre
- 752fbb7fdeploy.sh: back up live storage/.sessions/.env before every deploy (newest 5 kept)mre
- 38bdd5e4deploy.sh: never send .git or .gitignore to Byrodinmre
- f12fa1bcState of 2026-09-27, before the move to gitoriamre