Repository navigation
The studio opens from a link, and takes a text from the page that opened it - #27
Merged
Merged
Conversation
…ned it A page that lists real documents can now open the studio on one of them: ?repo=owner/name&ref=branch&folder=path&handoff=1 opens that analyzer from GitHub (kept across the sign-in round trip), and the text arrives by postMessage from window.opener -- never in the URL, only from an origin listed in NLP_STUDIO_OPENERS (none by default), at most 2 MB. A handed-in text is input/<name>.txt for as long as the page is open and is what a run reads. It is never a draft, never among the changed files, never committed and never in the Download zip; the file list says so beside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This lets a page that lists real documents open the studio on one of them, in the analyzer that reads it, ready to run and edit. The first user is TEG's NLP console: its Workbench has a button on every résumé.
The link names the analyzer:
?repo=owner/name&ref=branch&folder=path&handoff=1. It opens that analyzer from GitHub the way Open from GitHub does. If the person isn't signed in, the link is kept insessionStorageacross the sign-in round trip.The text is never in the link. With
handoff=1:nlp-studio:readytowindow.opener.{type: "nlp-studio:input", name, text}only if all of these hold:NLP_STUDIO_OPENERS(reported by/api/health; none by default);input/<name>.txt.A handed-in text is never kept. It is an input file while the page is open, and it is what a run reads. It is never:
The file list says so beside it. A reload (signing in is one) loses it, and the studio says
readyagain so the opener can hand it over again.Changes
src/handoff.ts: parsing the link, keeping it across sign-in, the name rule, and message acceptance.main.ts:openLink;changedPaths, the zip and the file list's normal Input rows.server/app.py:NLP_STUDIO_OPENERS→/api/healthopeners.docs/ARCHITECTURE.md: a new section.deploy/env.example: the new variable.Tests
tsc --noEmitis clean.🤖 Generated with Claude Code