Commit Graph

35 Commits

Author SHA1 Message Date
Iqbal
5bc0915edf Open all content filtered to the activity tab you were on
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:49:07 +07:00
Iqbal
d00561f75d Keep the sign-out button visible with a long name or email
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:25:50 +07:00
Iqbal
8d745ad96e Fit the knowledge graph in the viewport on short screens
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:21:33 +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
bdae539e9e Show only the knowledge base and content in the knowledge graph
The graph now represents the agent's Brain: its documents and the
content made from them. Work in progress, failed runs, research
suggestions and schedules are status, so they are left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 11:51:04 +07:00
Iqbal
643c3c39f9 Remove the Brain panel from the Brain and AI page
The page is back to the chat and the plan side by side. With nothing to
tick, new schedules always use the whole Brain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 11:50:39 +07:00
Iqbal
adbcfcc7ba Keep the knowledge graph when one schedule fails to load
One failing per-schedule request no longer blanks the whole graph, and
the graph shows the engine's own error instead of always saying the
engine cannot be reached.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 10:19:56 +07:00
Iqbal
278c66897a Make the sidebar collapsible and let the knowledge graph go full screen
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 10:14:34 +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
43a977017b Merge pull request 'show-run-errors-and-reprocess' (#2) from show-run-errors-and-reprocess into main
Reviewed-on: #2
2026-10-28 09:40:05 +00: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
b63e9c2ca8 Make the Brain agent ask instead of guess, and answer how schedules run
Generic requests ("10 konten", "10 pdf") now become a rule whose kind the
agent asks about, and a rule with no frequency is asked about instead of
silently becoming weekly. Times like 09.00 no longer split sentences, and
requests about drafts, the hour, scheduling, sources and duplicates get a
truthful note rather than an "I did not understand" loop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 14:09:27 +07:00
Iqbal
d018c6826f Collapse sidebar nav groups into dropdowns that open on the active page
Each group label (Dashboard, Settings) toggles its items; a group starts
closed unless it holds the current route, and a manual toggle resets on
the next navigation. Mobile keeps every item visible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 13:55:27 +07:00
Iqbal
844c88912a Add deploy.sh for Netlify production deploys
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 23:22:57 +07:00
Iqbal
6f3a5234b4 Turn Production into a welcome dashboard with content activity
Greet the user by name, drop the development-phase strip, move three metric
cards (material in the Brain, content made, uploaded to the LMS) below the
knowledge graph, and add a content activity section with the latest and
in-progress results as Results cards that open their preview in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 23:22:57 +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
ef4fb7d971 Rename Brain to Upload material and Instruction to Brain and AI
Upload material (/upload) drops the metric cards for a larger upload box
above the material list; Brain and AI moves to /brain. Old paths redirect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 22:36:52 +07:00
c1063bfa7e Merge pull request 'production-dashboard' (#1) from production-dashboard into main
Reviewed-on: #1
2026-10-27 14:58:52 +00:00
Iqbal
68050d8d4b Pin production Clerk key and Studio URL for local builds
A build without them used learning-lab's dev Clerk key, so production
users signed in to the wrong instance and saw no data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 21:56:56 +07:00
Iqbal
9f9fc93dfe Retry failed videos with a new run and explain documents that fail after their build
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 21:48:00 +07:00
Iqbal
8a02f68589 Link to Learning Lab from the topbar
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 21:48:00 +07:00
Iqbal
ddbdbc7d44 Add a Production dashboard with an animated knowledge graph
The sidebar now groups Production under Dashboard and the four existing
pages under Settings, and Production is the landing page. It shows content
in progress, material, content made, approved and LMS-ready counts, plus a
knowledge graph linking Brain documents, results, found sources and
schedules, with the schedule and what is being made right now beside it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:57:10 +07:00
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