Skip to content

studio: work inside opencontroller: its roles, its errors, the studio's menu - #16

Merged
patel-lyzr merged 4 commits into
mainfrom
feat-opencontroller-module
Oct 6, 2026
Merged

patel-lyzr merged 4 commits into
mainfrom
feat-opencontroller-module

Conversation

@patel-lyzr

Copy link
Copy Markdown
Collaborator

What this does

Makes the studio work fully inside opencontroller, which now shows it under Fine-tuning (NeuralgoLyzr/opencontroller#41). Opened on its own, the studio is unchanged.

Embedded, the studio now:

  • Hides what the host's role would refuse (allows() in lib/embed.ts):

    • viewers read;
    • operators add datasets and models, train, cancel, take the weights and use the playground;
    • administrators mint machine tokens.

    The host's proxy is what decides; the studio only hides.

  • Shows the host's refusals:

    • api.ts reads RFC 9457 errors (detail, title) beside its own error, so refusals are no longer blank;
    • a 403 is shown as a toast in the host, including where a page dropped the error;
    • the artifact download no longer calls alert(), which a framed page can't use.
  • Sends its menu to the host over oc-embed/1:

    • menu carries its sections, the island's actions the role allows (Hugging Face token, Clean VRAM), and Docs/GitHub;
    • the host shows the studio's own menu instead of a copy;
    • an action chosen there comes back as action and runs in the studio, where its dialog is.
  • Shares its island rows: the Hugging Face token and VRAM rows are now hooks, shared by the island and the host's menu.

Also in this PR:

  • the menu now leads with the Playground (its own commit);
  • the README and CLAUDE.md explain how to connect the studio to opencontroller;
  • the shipped UI is rebuilt.

Testing

  • tsc -b passes, and lint shows the same problems as main, with none new.
  • Locally, framed in opencontroller (headless Chrome):
    • every section works from the host's menu;
    • as a viewer: change controls hidden, the playground composer disabled with a note, Train and Machines show why;
    • the host's Clean VRAM freed memory here, and its Hugging Face token opened the studio's dialog;
    • no page errors.

🤖 Generated with Claude Code

patel-lyzr and others added 4 commits October 5, 2026 23:38
Where you talk to what you own comes first, then the shadowing loop:
data and a base model, training, the runs.
Embedded, the studio now:
- shows only the controls the host's role allows (allows() in
  lib/embed.ts): viewers read; operators add datasets and models, train,
  cancel, take the weights and use the playground; administrators mint
  machine tokens. The host's proxy decides; this only hides what it
  would refuse.
- reads the host proxy's errors (RFC 9457 detail and title, beside its
  own error), and says a refusal as a toast in the host, where a page
  dropped it before; a framed page cannot alert().
- sends the host its menu over oc-embed/1 ("menu"): its sections, the
  island's actions the role allows and its links, so the host shows the
  studio's own menu, not a copy. An action chosen there comes back
  ("action") and runs here, where its dialog is.

The island's Hugging Face token and VRAM rows are hooks now, shared by
the island and the host's menu. On its own, the studio is as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings -> Fine-tuning there, with the studio's API key or a machine
token minted for it; what each role may do; the menu the studio sends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@patel-lyzr
patel-lyzr merged commit 307e592 into main Oct 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant