gitoria

tickets

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitd083535bd083535bticket_list: nest Style rules and bare media queriesmred083535b/components/ticket_list.hl

18.6 KB

  1. // components/ticket_list.hl — `/`, `/project/:projectName` (also `/:projectName`, ticket #25),
  2. // `/state/:stateSlug` and both:
  3. // the tickets, newest update first, filtered by project and state. At the right of the heading: "New ticket" (the accent button) and
  4. // "New project" (a quiet one); each opens its form in the theme's modal window (a full-screen window on a phone). Live: a ticket created or changed anywhere (web or API) lands in,
  5. // moves within or leaves this list without a reload. Ticket #12: the summary is edited visually — since mission 016 in the
  6. // Hybriel MdEditor (components/md-editor/; its hidden field keeps the Markdown and fires `input`).
  7. // Ticket #20: a project's page (`/<slug>`, also `/project/<slug>`; `/projects/<slug>` answers 301) shows its title, description
  8. // (Markdown), its tickets and — for an admin — the link to its settings page. The new-ticket form needs the
  9. // role edit or admin: its project choice holds only the projects the user may open tickets in.
  10. parent './main.hl'
  11. import { ticketRows, firstRows, createTicket } from '../lib/tickets.hl'
  12. import { projectLinks, stateLinks, stateOfSlug } from '../lib/tickets-helpers.hl'
  13. import { projectByAnySlug, editableProjects, isAdminOf } from '../lib/projects.hl'
  14. import { markdownBlocks } from '../lib/markdown.hl'
  15. import { siteName } from '../project.hl'
  16. import { canWriteSession, writerOfSession, userOfSession } from '../lib/users.hl'
  17. import { connectionRows, disconnect } from '../lib/connections.hl'
  18. import Markdown from './markdown.hl'
  19. import MdEditor from './md-editor/md-editor.hl'
  20. import Modal from './modal/modal.hl'
  21. import ProjectForm from './project-form.hl'
  22. import { hintLook, messageLook, noticeLook, subjectLook, ticketsLook } from '../lib/looks.hl'
  23. projectName = null
  24. stateSlug = null
  25. filterState = stateOfSlug(stateSlug)
  26. // the page draws the newest 50 and a button asks for 50 more: all ~500 rows at once (server-built, shipped, drawn) were a 2–4 s first
  27. // paint and a 90 000 px page on a phone. `total` = how many tickets the filters match
  28. pageSize = 50
  29. limit = pageSize
  30. first = firstRows(projectName, filterState, limit)
  31. rows = first.rows
  32. total = first.total
  33. projects = projectLinks(projectName, filterState)
  34. stateFilters = stateLinks(projectName, filterState)
  35. session = null
  36. project = projectName != null ? projectByAnySlug(projectName) : null
  37. noSuchProject = projectName != null && project == null
  38. projectId = project != null ? project.id : ''
  39. hasDescription = project != null && project.description != null && project.description != ''
  40. descriptionMd = hasDescription ? markdownBlocks(project.description) : []
  41. isAdmin = project != null && isAdminOf(project.id, userOfSession(session))
  42. // ticket #21: the apps connected to this project (connections.hl), shown to everybody; an admin can disconnect
  43. connections = project != null ? connectionRows(project.id) : []
  44. hasConnections = connections.length > 0
  45. connectionMessage = ''
  46. settingsHref = project != null ? '/projects/' + project.slug + '/settings' : ''
  47. isEmpty = rows.length == 0
  48. hasMore = rows.length < total
  49. moreLabel = 'Show ' + pageSize + ' more (' + (total - rows.length) + ' left)'
  50. heading = (projectName != null ? (project != null ? project.title : projectName) : 'All projects') + (filterState != null ? ' · ' + filterState : '')
  51. __title = siteName + ' | ' + heading
  52. // the new-ticket form
  53. myProjects = editableProjects(userOfSession(session))
  54. newProject = projectName != null && project != null ? project.slug : (myProjects.length > 0 ? myProjects[0].slug : '')
  55. newSubject = ''
  56. newSummary = ''
  57. newMessage = ''
  58. // the MdEditor is built once per element: a new key gives the next ticket an empty editor
  59. summarySeq = 0
  60. summaryForms = [{ id = 'summary-0' }]
  61. // only for a member with the role edit or admin (ticket #20): the author is that user
  62. canWrite = myProjects.length > 0
  63. canCreateProject = canWriteSession(session)
  64. mustLogIn = userOfSession(session) == null
  65. noRole = userOfSession(session) != null && myProjects.length == 0
  66. notice = ''
  67. noticeHref = ''
  68. noticeLink = 'open it'
  69. hasNotice = false
  70. Style {
  71. pMessage = messageLook + { }
  72. pHint = hintLook + { }
  73. '#notice' = noticeLook + { }
  74. ticketBoard {
  75. display = 'grid'
  76. gap = '1rem'
  77. // Keep the selector into a composed component; this View does not own its elements.
  78. 'modal-dialog > dialog' {
  79. width = '100vw'
  80. height = '100dvh'
  81. maxHeight = 'none'
  82. borderRadius = '0'
  83. }
  84. }
  85. ticketFilters {
  86. display = 'grid'
  87. gap = '.5rem'
  88. nav {
  89. display = 'flex'
  90. flexWrap = 'nowrap'
  91. gap = '.35rem'
  92. overflowX = 'auto'
  93. scrollbarWidth = 'none'
  94. a {
  95. flex = 'none'
  96. whiteSpace = 'nowrap'
  97. display = 'inline-flex'
  98. alignItems = 'center'
  99. minHeight = 'var(--layout-tap)'
  100. padding = '.2rem .8rem'
  101. background = 'var(--color-surface)'
  102. fontSize = '.875rem'
  103. color = 'var(--color-text)'
  104. borderRadius = 'var(--radius-small)'
  105. }
  106. // Keep the compound class selector; there is no same-element bare form.
  107. 'a.selected' {
  108. color = 'var(--color-accent-text)'
  109. background = 'var(--color-accent)'
  110. }
  111. // Keep the compound class selector; there is no same-element bare form.
  112. 'a.selected.open' {
  113. color = 'var(--color-accent-text)'
  114. }
  115. // Keep the compound class selector; there is no same-element bare form.
  116. 'a.selected.progress' {
  117. color = 'var(--color-accent-text)'
  118. }
  119. // Keep the compound class selector; there is no same-element bare form.
  120. 'a.selected.pending' {
  121. color = 'var(--color-accent-text)'
  122. }
  123. // Keep the compound class selector; there is no same-element bare form.
  124. 'a.selected.review' {
  125. color = 'var(--color-accent-text)'
  126. }
  127. // Keep the compound class selector; there is no same-element bare form.
  128. 'a.selected.reopened' {
  129. color = 'var(--color-accent-text)'
  130. }
  131. // Keep the compound class selector; there is no same-element bare form.
  132. 'a.selected.done' {
  133. color = 'var(--color-accent-text)'
  134. }
  135. // Keep the compound class selector; there is no same-element bare form.
  136. 'a.selected.canceled' {
  137. color = 'var(--color-accent-text)'
  138. }
  139. @media {
  140. minWidth = '60rem'
  141. flexWrap = 'wrap'
  142. overflowX = 'visible'
  143. }
  144. }
  145. }
  146. '#tickets' {
  147. listStyle = 'none'
  148. margin = '0'
  149. padding = '0'
  150. display = 'grid'
  151. gap = '.5rem'
  152. li {
  153. display = 'grid'
  154. gridTemplateColumns = 'minmax(0, 1fr)'
  155. gap = '.3rem'
  156. padding = '.7rem .8rem'
  157. background = 'var(--color-surface)'
  158. borderRadius = 'var(--radius-large)'
  159. ticketState {
  160. justifySelf = 'start'
  161. }
  162. // Keep the combinator as a quoted nested key.
  163. '> a' {
  164. minWidth = 'var(--layout-tap)'
  165. minHeight = 'var(--layout-tap)'
  166. display = 'flex'
  167. alignItems = 'baseline'
  168. paddingBlock = '.5rem'
  169. color = 'var(--color-text-strong)'
  170. fontWeight = '600'
  171. overflowWrap = 'anywhere'
  172. }
  173. @media {
  174. minWidth = '60rem'
  175. gridTemplateColumns = '8.5rem minmax(0, 1fr) auto'
  176. alignItems = 'center'
  177. gap = '1rem'
  178. }
  179. }
  180. }
  181. ticketRef {
  182. flex = 'none'
  183. marginRight = '.4rem'
  184. color = 'var(--color-text-muted)'
  185. fontWeight = '400'
  186. whiteSpace = 'nowrap'
  187. }
  188. ticketMeta {
  189. display = 'flex'
  190. flexWrap = 'wrap'
  191. alignItems = 'center'
  192. gap = '.2rem .8rem'
  193. fontSize = '.875rem'
  194. a {
  195. display = 'inline-flex'
  196. alignItems = 'center'
  197. minWidth = 'var(--layout-tap)'
  198. minHeight = 'var(--layout-tap)'
  199. }
  200. }
  201. assignee {
  202. color = 'var(--color-text-muted)'
  203. }
  204. // Keep the selector into a composed component; this View does not own its elements.
  205. 'modal-dialog form' {
  206. display = 'grid'
  207. gap = '.7rem'
  208. }
  209. headingRow {
  210. display = 'flex'
  211. flexWrap = 'wrap'
  212. alignItems = 'center'
  213. justifyContent = 'space-between'
  214. gap = '.5rem 1rem'
  215. h1 {
  216. margin = '0'
  217. }
  218. }
  219. headingActions {
  220. display = 'flex'
  221. flexWrap = 'wrap'
  222. gap = '.5rem'
  223. }
  224. ticketState {
  225. display = 'inline-block'
  226. background = 'var(--color-background-sunken)'
  227. padding = '.05rem .55rem'
  228. fontSize = '.875rem'
  229. fontWeight = '600'
  230. whiteSpace = 'nowrap'
  231. borderRadius = 'var(--radius-small)'
  232. color = 'var(--color-text-muted)'
  233. }
  234. // Keep the compound class selector; there is no same-element bare form.
  235. 'ticket-state.open' {
  236. color = 'var(--color-action)'
  237. }
  238. // Keep the compound class selector; there is no same-element bare form.
  239. 'ticket-state.progress' {
  240. color = 'var(--color-warning)'
  241. }
  242. // Keep the compound class selector; there is no same-element bare form.
  243. 'ticket-state.pending' {
  244. color = 'var(--color-text-muted)'
  245. }
  246. // Keep the compound class selector; there is no same-element bare form.
  247. 'ticket-state.review' {
  248. color = 'var(--color-accent)'
  249. }
  250. // Keep the compound class selector; there is no same-element bare form.
  251. 'ticket-state.reopened' {
  252. color = 'var(--color-danger)'
  253. }
  254. // Keep the compound class selector; there is no same-element bare form.
  255. 'ticket-state.done' {
  256. color = 'var(--color-success)'
  257. }
  258. // Keep the compound class selector; there is no same-element bare form.
  259. 'ticket-state.canceled' {
  260. color = 'var(--color-text-muted)'
  261. }
  262. projectActions {
  263. display = 'flex'
  264. flexWrap = 'wrap'
  265. gap = '.5rem'
  266. // Keep the compound class selector; there is no same-element bare form.
  267. 'a.button' {
  268. background = 'var(--color-surface)'
  269. }
  270. }
  271. '#connections' {
  272. listStyle = 'none'
  273. margin = '0'
  274. padding = '0'
  275. display = 'grid'
  276. gap = '.4rem'
  277. li {
  278. display = 'flex'
  279. flexWrap = 'wrap'
  280. alignItems = 'center'
  281. gap = '.2rem .6rem'
  282. padding = '.4rem .8rem'
  283. background = 'var(--color-surface)'
  284. borderRadius = 'var(--radius-large)'
  285. fontSize = '.9rem'
  286. }
  287. }
  288. projectDescription {
  289. display = 'block'
  290. padding = '.8rem'
  291. overflowWrap = 'anywhere'
  292. background = 'var(--color-surface)'
  293. borderRadius = 'var(--radius-large)'
  294. }
  295. '#connectionmessage' {
  296. empty {
  297. display = 'none'
  298. }
  299. }
  300. // Keep the query at Style root so size declarations stay declarations.
  301. @media {
  302. minWidth = '60rem'
  303. ticketBoard {
  304. // Keep the selector into a composed component; this View does not own its elements.
  305. 'modal-dialog > dialog' {
  306. width = 'min(34rem, calc(100vw - 2rem))'
  307. height = 'fit-content'
  308. maxHeight = 'calc(100dvh - 2rem)'
  309. borderRadius = 'var(--radius-large)'
  310. }
  311. }
  312. }
  313. }
  314. View {
  315. ticketBoard {
  316. headingRow {
  317. h1 { id = "heading" heading }
  318. headingActions {
  319. if (canCreateProject) { button { id = "newprojectlink" type = "button" "New project" on click(e) { emit openWindow('newprojectmodal') } } }
  320. if (canWrite) { button { id = "newticketbutton" type = "button" class = "primary" "New ticket" on click(e) { emit openWindow('newticketmodal') } } }
  321. }
  322. }
  323. ticketFilters {
  324. nav { id = "projectfilter"
  325. for (f of projects) { a { href = f.href class = f.cls f.label } }
  326. }
  327. nav { id = "statefilter"
  328. for (f of stateFilters) { a { href = f.href class = f.cls f.label } }
  329. }
  330. }
  331. if (noSuchProject) { p { id = "noproject" class = "empty" "There is no such project." } }
  332. if (hasDescription) { projectDescription { id = "description" Markdown { blocks = descriptionMd } } }
  333. if (hasConnections) { ul { id = "connections"
  334. for (c of connections) {
  335. li { class = "connection"
  336. "Connected to " strong { c.text }
  337. if (isAdmin) { button { type = "button" class = "quiet danger disconnect" "Disconnect" on click(e) { emit dropConnection(c.id) } } }
  338. }
  339. }
  340. } }
  341. p { id = "connectionmessage" Style.pMessage connectionMessage }
  342. if (isAdmin) { projectActions { a { id = "settingslink" class = "button" href = settingsHref "Project settings" } } }
  343. if (mustLogIn) { p { id = "loginhint" Style.pHint "Reading is open to everyone. To open a ticket, log in with ident (top right)." } }
  344. if (noRole) { p { id = "rolehint" Style.pHint "To open a ticket you need the role edit or admin in a project — ask an admin of the project to invite you." } }
  345. if (canWrite) { Modal { id = "newticketmodal" title = "New ticket"
  346. form { id = "newticketform"
  347. on submit(e) {
  348. e.preventDefault()
  349. emit create(e)
  350. }
  351. label { "Project"
  352. select { id = "newproject" name = "project" value = newProject on change(e) { emit setProject(e.target.value) }
  353. for (p of myProjects) { option { value = p.slug p.title } }
  354. }
  355. }
  356. label { "Subject"
  357. input { id = "newsubject" name = "subject" required = "required" maxlength = "200" value = newSubject on input(e) { emit setSubject(e.target.value) } }
  358. }
  359. mdField { id = "newsummary" on input(e) { emit setSummary(e.target.name, e.target.value) }
  360. span { "Summary" }
  361. for (f of summaryForms) { MdEditor { name = "summary" value = "" rows = 4 placeholder = "" files = "off" } }
  362. }
  363. button { id = "newsubmit" type = "submit" "Open ticket" }
  364. p { id = "newmessage" Style.pMessage newMessage }
  365. }
  366. } }
  367. if (canCreateProject) { Modal { id = "newprojectmodal" title = "New project"
  368. ProjectForm { onCreated = projectCreated }
  369. } }
  370. if (hasNotice) { p { id = "notice" notice " " a { id = "noticelink" href = noticeHref noticeLink } } }
  371. if (isEmpty) { p { id = "empty" class = "empty" "No tickets here." } }
  372. ol { id = "tickets" class = "tickets"
  373. for (row of rows) {
  374. li {
  375. ticketState { class = row.stateSlug row.state }
  376. a { class = "subject" href = row.href ticketRef { row.ref } row.subject }
  377. ticketMeta {
  378. a { href = row.projectHref row.projectTitle }
  379. if (row.hasAssignee) { assignee { "→ " row.assignee } }
  380. time { row.updated }
  381. }
  382. }
  383. }
  384. }
  385. if (hasMore) { button { id = "moretickets" type = "button" class = "quiet" moreLabel on click(e) { emit showMore(e) } } }
  386. }
  387. }
  388. on showMore(e) {
  389. limit = limit + pageSize
  390. r = emit server moreRows(projectName != null ? projectName : '', filterState != null ? filterState : '', limit)
  391. if (r != null && r.rows != null) {
  392. rows = r.rows
  393. total = r.total
  394. isEmpty = rows.length == 0
  395. hasMore = rows.length < total
  396. moreLabel = 'Show ' + pageSize + ' more (' + (total - rows.length) + ' left)'
  397. }
  398. }
  399. on server moreRows(project, state, n, session) {
  400. return firstRows(project != '' ? project : null, state != '' ? state : null, n)
  401. }
  402. // the window of a form (Esc, the × and a tap beside it close it)
  403. on openWindow(id) { document.getElementById(id).showModal() }
  404. on setProject(v) { newProject = v }
  405. on setSubject(v) { newSubject = v }
  406. // the MdEditor announces its Markdown with an `input` event on its hidden field (named); its other inputs are not it
  407. on setSummary(name, v) { if (name == 'summary') { newSummary = v } }
  408. on create(e) {
  409. if (newProject.trim() == '' || newSubject.trim() == '') { return null }
  410. r = emit server openTicket(newProject, newSubject, newSummary)
  411. if (r != null && r.error == null) {
  412. notice = 'Opened ' + r.project + ' ' + r.ref + '.'
  413. noticeHref = r.href
  414. noticeLink = 'open it'
  415. hasNotice = true
  416. newMessage = ''
  417. document.getElementById('newticketmodal').close('opened')
  418. newSubject = ''
  419. newSummary = ''
  420. summarySeq = summarySeq + 1
  421. summaryForms = [{ id = 'summary-' + summarySeq }]
  422. } else {
  423. newMessage = r != null ? r.error : 'could not open the ticket'
  424. }
  425. }
  426. // the project form (components/project-form.hl) tells the page: the window closes, the page says it and links the settings
  427. projectCreated = (title, settingsHref) => {
  428. notice = 'Created ' + title + '.'
  429. noticeHref = settingsHref
  430. noticeLink = 'open its settings'
  431. hasNotice = true
  432. document.getElementById('newprojectmodal').close('created')
  433. }
  434. // does a row belong in THIS list (its filters)?
  435. belongs = (row) => {
  436. return (projectName == null || row.projectId == projectId) && (filterState == null || row.state == filterState)
  437. }
  438. // the row goes to the top (newest update first) if it belongs, and out if not
  439. place = (row) => {
  440. let wasIn = false
  441. for (r of rows) { if (r.id == row.id) { wasIn = true } }
  442. allShown = rows.length >= total
  443. next = []
  444. if (belongs(row)) { next.push(row) }
  445. for (r of rows) { if (r.id != row.id) { next.push(r) } }
  446. // a new ticket joins the count when everything was on the page; one that left the filter leaves it
  447. if (belongs(row) && !wasIn && allShown) { total = total + 1 }
  448. if (!belongs(row) && wasIn) { total = total - 1 }
  449. if (allShown && next.length > limit) { limit = next.length }
  450. rows = next.length > limit ? next.slice(0, limit) : next
  451. isEmpty = rows.length == 0
  452. hasMore = rows.length < total
  453. moreLabel = 'Show ' + pageSize + ' more (' + (total - rows.length) + ' left)'
  454. }
  455. on client ticketCreated(row) { place(row) }
  456. on dropConnection(id) {
  457. r = emit server disconnectApp(projectId, id)
  458. if (r == null || r.error != null) {
  459. connectionMessage = r != null ? r.error : 'could not disconnect'
  460. return null
  461. }
  462. connectionMessage = ''
  463. connections = r.connections
  464. hasConnections = r.connections.length > 0
  465. }
  466. on client connectionsChanged(slug) {
  467. r = emit server connectionsOfProject(projectId)
  468. if (r != null && r.connections != null) {
  469. connections = r.connections
  470. hasConnections = r.connections.length > 0
  471. }
  472. }
  473. on client signedIn(tag, info) {
  474. r = emit server whatICanOpen(projectName != null ? projectName : '')
  475. if (r != null && r.projects != null) {
  476. myProjects = r.projects
  477. canWrite = r.projects.length > 0
  478. noRole = r.projects.length == 0 && info.named
  479. canCreateProject = info.named
  480. mustLogIn = false
  481. isAdmin = r.admin == true
  482. if (newProject == '' && r.projects.length > 0) { newProject = r.projects[0].slug }
  483. }
  484. }
  485. on client signedOut(tag) {
  486. canWrite = false
  487. canCreateProject = false
  488. isAdmin = false
  489. noRole = false
  490. mustLogIn = true
  491. myProjects = []
  492. }
  493. on client ticketEvent(ticketId, ev, row) { place(row) }
  494. // THE FACE: a ticket opened from the web by the session's user (#31: only a real session).
  495. // The same push the API sends.
  496. on server openTicket(project, subject, summary, session) {
  497. w = writerOfSession(session)
  498. if (w.error != null) { return { error = w.error } }
  499. r = createTicket(project, subject, summary, w.user, null, null)
  500. if (r.error != null) { return { error = r.error } }
  501. emit client ticketCreated(r.ticket)
  502. return r.ticket
  503. }
  504. // what this session's user may do here after a login without a reload: the projects they may open tickets in,
  505. // and whether they are an admin of THIS page's project (`slug` null = the all-projects page)
  506. on server whatICanOpen(slug, session) {
  507. u = userOfSession(session)
  508. if (u == null) { return { error = 'log in first' } }
  509. p = slug != null && slug != '' ? projectByAnySlug(slug) : null
  510. return { projects = editableProjects(u) admin = p != null && isAdminOf(p.id, u) }
  511. }
  512. // ticket #21: an admin ends a connection — the key is dead at once (connections.hl)
  513. on server disconnectApp(projectId, connectionId, session) {
  514. w = writerOfSession(session)
  515. if (w.error != null) { return { error = w.error } }
  516. r = disconnect('' + projectId, w.user, '' + connectionId)
  517. if (r.error != null) { return { error = r.error } }
  518. emit client connectionsChanged('')
  519. return { connections = r.connections }
  520. }
  521. on server connectionsOfProject(projectId, session) {
  522. return { connections = connectionRows('' + projectId) }
  523. }

Branches

Latest commits

  • d083535bticket_list: nest Style rules and bare media queriesmre
  • c24608ebmarkdown: format Style with nested language rulesmre
  • de964b3bsettings: format Style with nested language rulesmre
  • 03c1de05new_project: format Style with nested language rulesmre
  • bd76cfa6connect: format Style with nested language rulesmre
  • 01fad593inbox: format Style with nested language rulesmre
  • 79dc9392you: format Style with nested language rulesmre
  • 78073baamain: format Style with nested language rulesmre
  • 5499c290Sync theme unchanged from layouts 17e0f03mre
  • fd33ee21Sync reviewed components from 8176eb1mre
  • 93348453Re-vendor tickets to Hybriel set day35mre
  • a4123831tickets#42: the /connect and /login/callback error pages are app pages: the function routes redirect to /connect/failed/<code> and /login/failed/<code> (components/problem.hl, sentences in lib/problems.hl), htmlPage and its hand-written stylesheet are gone; gate tests/error-pages.mjsmre
  • cefc7b4atickets: a startup error prints its message before exit 1 (hybriel#247)mre
  • 99bd6570tickets: lib/migrate.hl writes no table of another topic any more: projects.hl rewriteSlug / addProjectNamed / hasMembers, tickets.hl moveToProject / ticketRecords / ticketRecordsOf, events.hl renameStates / eventRecords / eventRecordsOf; the migration calls them (tickets#47)mre
  • b57161e3tickets: the markup names its own rules (Style.pMessage, Style.olTickets, ...) instead of hand-written class strings that copy a stylesheet rule; the shared bodies sit in lib/looks.hl (tickets#38)mre
  • f767b24dtickets: 111 needless let became plain declarations (3 in ticket.hl, ticket_list.hl, comments.hl and 108 never-reassigned, not captured loop-body ones); the 212 really reassigned lets stay (tickets#44)mre
  • 16c0d3b5tickets: the modal window is phone first: the full-screen sheet is the base rule, the centred window sits in the min-width 60rem block (tickets#39)mre
  • 090ee809tickets: every component's styles in its own nested Style {} block; styles.hl keeps only the theme inherit, the accent and the site-wide rules (tickets#36)mre
  • d395763ftickets: ident-access gate ports 8769/8768 (8797 is taken on loreana)mre
  • afb9a403tickets: an ident access key (Authorization: Bearer idt_…) works in the API (ident#27 app side): lib/ident-access.hl copied from components, read keys GET only, ident down 503; gate tests/ident-access-tickets.mjsmre