Commit Graph

12 Commits

Author SHA1 Message Date
Iqbal
6d4850f4ce Switch organizations from the Learning space card
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:59:22 +07:00
Iqbal
51700bc0f3 Deploy to Netlify with the engine behind a same-origin /api proxy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:56:37 +07:00
Iqbal
42464d88b3 Show the workspace credit balance in the topbar
Read from GET /organizations/me, refreshed after every action and every
30 seconds, since agents and schedules spend credits in the background.
The date is dropped from the topbar, and its items wrap on phones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:57:01 +07:00
Iqbal
7c17191b8b Open Brain documents from their title
Clicking a document's title fetches the original file from the engine:
viewable formats open in a new tab, the rest (or a blocked tab) download
under the original name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:48:07 +07:00
Iqbal
c294e91253 Open a result by clicking anywhere on its card
Drop the Open button: the title's hit area now covers the whole card,
with Retry kept on top so it doesn't open the preview.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:38:52 +07:00
Iqbal
a4189f0d2a Fit the sign-in page on phones with a full blue background
Shorten the story header so the form shows without scrolling, keep the
Clerk card inside the screen, and run one blue background behind the
whole page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 12:33:51 +07:00
Iqbal
a1d49b37b5 Make the Instruction agent reply in the user's language, at a human pace
The agent answers in the language each message is written in (Indonesian
or English), whatever the UI language; short replies such as "LLM" keep
the conversation's language. inLang() runs t() in that language.

Each turn now reads like a person: a thinking step with what the agent is
doing, the reply typed out with "Thought for Ns" above it, a short typing
pause, then one question, with its options shown once it is typed.
Reduced motion skips the animation.

"dari file LLM" / "from the document X" is read as the topic, and topics
keep the user's capitals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 11:38:08 +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
2b37d80e26 Turn Instruction into a chat with an agent that asks
The Instruction page is now a conversation with the Express Agent. Each
message updates the draft plan, and when something is unclear (a part it
did not understand, a video count with no cadence, a schedule over 50 per
week, weekly research with no day, a missing topic) the agent asks right
in the chat, one question at a time, with replies to pick or type. Once
the plan is clear it offers to start the schedules and reports the result
in the chat. The plan stays editable beside the chat.

The chat text is also larger and darker than the mockup's 9-11px grey.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 11:23:47 +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
3df72c68ef Show results whose plan item stopped as failed
The engine can stop a plan item without updating its drafts: a run paused
on material_quote_changed leaves the draft "preparing" for good, so the
result showed Preparing forever. A draft still at work now counts as
failed once its plan item is failed, blocked, cancelled or skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 11:02:10 +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