Commit Graph

11 Commits

Author SHA1 Message Date
Iqbal
677937eb98 Follow a running production every few seconds
A started production kept showing "AI picks new topics" for a minute
or more: each schedule's status was read once a minute, and the refresh
right after starting got the read kept from before the start. That read
is now dropped when a production starts, and while the latest production
is under way its status is read every five seconds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:50:05 +07:00
Iqbal
74d7e01e4f Attach Brain material without blocking a schedule's status
Saving a topic or resuming sent one PUT per ready document (about 150),
and a topic change left the schedule in draft (shown as paused) until
all of them were done. Creating a schedule waited on the same loop with
no sign of progress.

A topic change now re-activates (or keeps paused) right after the PATCH,
and resuming is one activate; both then attach only the documents the
schedule does not have yet. Creating a schedule still attaches every
ready document, three at a time and paced under the proxy's rate limit,
retrying a busy answer instead of skipping it, and the Instruction chat
shows how many are done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 13:44:26 +07:00
Iqbal
977a8fafc4 Pace engine reads under the proxy's rate limit
The proxy allows 10 requests a second per address and answers the rest
503. Limiting how many reads run at once still sent 40-50 a second, since
each answers in about 100 ms. Reads now share one pace of 8 a second,
actions skip the queue, and a 503 pauses every read for 2 seconds.
Results and Schedule share each schedule's production status, and an
archived schedule is read once until an action.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 10:06:40 +07:00
Iqbal
bcd747721d Show who created each schedule and start with your own
Org admins see every Express schedule in the organization, so a shared
organization mixed everyone's schedules together. The Schedule page now
shows "Created by …" on each one and, when others' schedules are listed,
switches between Mine and Everyone in the organization.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:18:28 +07:00
Iqbal
bcd7964e0b Say when a research run found no new sources
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 10:14:34 +07:00
Iqbal
a73a5a3fdf Require two materials for content schedules and scope readiness copy
The engine plans each production piece from a pair of documents, so a
summary, quiz or similar schedule with one material can never plan. Approving
such a plan is now blocked with a note to choose or upload another material,
and the engine's refusal on an existing schedule is explained in plain
language. Video and research schedules still work with one material.

The engine now checks only a schedule's own material before a run, so the
run error and Upload texts no longer say the whole Library or Brain is
checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 16:37:56 +07:00
Iqbal
d1492b9c76 Explain blocked schedule runs and let a failed document be processed again
Schedule history now shows a readable reason instead of the engine's raw code,
and under the newest run stopped by knowledge_not_ready it lists the Library
material that blocks it, with a link to fix it in Learning Studio. The list
refreshes while that material is still processing or building.

Upload gets a "Process again" button for a failed document, using the engine's
new reprocess endpoint; a knowledge base the document already has is kept. A
document being processed again no longer shows as "In the Brain".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 15:13:03 +07:00
Iqbal
3b56c27210 Show the Brain beside the AI chat and make schedules from chosen material
The Brain and AI page lists Brain material (failed documents hidden) with
search, open, delete and per-material or select-all ticks. New schedules use
only the ticked material, kept through topic edits and resumes; nothing ticked
means the whole Brain. With material ticked, the agent skips the content topic
question and names the material in the chat and plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 22:53:38 +07:00
Iqbal
f55cccb6eb Ask which language the content is written in
The Instruction agent now confirms the output language before the plan is
ready: Bahasa Indonesia, English or 中文, the languages the engine writes
in. It can also be named in the instruction ("pakai bahasa Inggris"), is
read from short replies, and can be changed in the plan. Research alone
is not asked about.

The engine's content production has no language field, so the choice
goes into the agent's instructions; video schedules also set
video_options.language. ruleOf reads it back, so editing a topic keeps
it. The audio player recognises Chinese scripts and uses a zh-CN voice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 11:32:06 +07:00
Iqbal
e00ffe9465 Add Retry for failed results
A failed plan item gets a Retry button on its card and in the preview. It
asks the engine for a fresh quote for that item and starts it again, while
the engine still allows another attempt (three per item).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 11:11:23 +07:00
Iqbal
f219b26f71 Initial commit: Learning Lab Express
Includes fixes found while reviewing the app:
- Results: open each result by a type+agent+id key, so a video and a
  material draft with the same id no longer open each other's popup
- AuthGate: clear the query cache during render, before pages build their
  queries, and remount pages on organization switch (pages no longer stay
  on skeletons for up to a minute after sign-in or refresh)
- Instruction: keep only failed rules after a partial approve, so retrying
  does not create the successful schedules twice; drop the monthly note
  once count or frequency is edited
- Parser/schedules: never schedule a count below one
- Audio: ignore the end event of a cancelled utterance when changing speed
- Downloads: revoke the object URL later so Safari/Firefox can read it
- Results: refetch SCORM content when any part's revision changes; show a
  failed video as failed instead of "still rendering"

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 10:42:12 +07:00