Skip to content

levain 0.6.7

Choose a tag to compare

@phillipclapham phillipclapham released this 05 Oct 20:32
· 4286 commits to main since this release

Chat panel polish from the first click-through.

Changed

  • Enter sends a chat message; Shift+Enter starts a new line. Only in the message box, and not while an input method is composing a character. No key approves or rejects a held action: the decision buttons are clicks, and Enter in the reject reason only starts a new line.
  • The reject reason is a one-line field that grows as you type. It rendered as a tall box with the placeholder centred vertically.
  • "Check what happened" (was "Re-read the session") shows what the lost request did. After an unclear outcome, GET /chat/session.json now returns last_job, the session's most recent job that started (its kind, status, activity and result), and the panel shows which actions ran and the entity's reply, but only when that job is the request it lost track of (the same job, or one that started after the last job the page saw start). If nothing has started since, it says the request has not run (and that a delayed request could still arrive); any other record is never shown as the outcome. A consent box still comes only from the session's current held set, with the "may already have run" warning. When the token is no longer accepted, the panel says "The server restarted, so that session has ended. Your last request may or may not have run"; when the server no longer has the session, it says so (a restart, or a session that ended and was cleaned up). Both name the entity's workspace to check: a restart ends every chat session, because they live in the server's memory.
  • A message is sent only by a real activation of Send (a click, or Enter or Space on the focused button) or a real Enter in the message box, never while the box is disabled or a decision is in flight; a scripted form submit sends nothing. No key approves anything by itself.
  • Approve asks once more, in place. Approve opens a confirm row, "Run the N held actions? [Cancel] [Run them]". Cancel takes Approve's place in the row and has the focus, so a held key lands on Cancel and a double click never reaches Run them; reaching Run them takes Tab or an arrow key, then Enter, Space or a click. Tab and the arrow keys stay inside the row while it is open, and Esc or Cancel closes it. Mouse and keyboard both work. Reject stays one step, and it comes before Approve, so Tab from the reject reason reaches Reject first.
  • A "Check what happened" answers for one lost request: it is removed as soon as you send another message or decide a held action, and a check that finds the request never started does not offer another.
  • Known limit: after the check reports that a lost request has not run, a request that was only delayed on the way and starts later can be read as the outcome of a later request that is also lost.