Repository navigation
Conversation
The bridge's run takes an optional second argument, run(workflow,
{ app, model }). When the page names its app, the /prompt body carries
extra_data.comfy_app = { id, model?, where: 'cloud' } next to the auth
token. Cloud keeps the whole extra_data in the job's workflow_json, so
the tag reaches Cloud's records with no Cloud change.
- app and model must be slugs (/^[a-z0-9][a-z0-9._-]{0,63}$/, the same
pattern the app events use, now in guards.ts). A bad app sends no
tag; a bad model is left out of it; the run still goes either way.
- A page that passes nothing (every page today) posts the body as
before, with no tag.
- The bridge version goes to 3 so a page can tell this Desktop apart.
No catalog check: the ticket asks for the id to be on the catalog's
Desktop app list, but that list is read by src/main/apps/catalog.ts in
Comfy-Desktop#1997, which is not on this base. The slug check stands in
until both land together.
Ref BE-26266
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…ainst the catalog
A Cloud run's extra_data.comfy_app.id came from the page's own run()
options, so any page could name another app or an unknown one. The id
now comes from the address of the page that sent the run (the slug in
/apps/<id>/), and Desktop sends it only when that slug is on the
catalog's Desktop app list
(/api/v1/catalog/items?type=app&surface=desktop_starters). Otherwise the
tag is left off and the run still goes.
The catalog reader that shows the app cards sits higher in this stack,
so this change reads the list itself: one request, kept for an hour,
an empty list when the catalog cannot be read. The page now passes only
{ model }; an app option from an older page is ignored. The catalog has
no per-app model list, so model keeps the slug check.
Ref BE-26266
# Conflicts: # src/main/apps/appsView.ts # src/main/apps/wiring.test.ts
# Conflicts: # src/main/apps/appsView.ts # src/main/apps/guards.test.ts
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.
TL;DR: Every Cloud run an app page starts carries
extra_data.comfy_app = { id, model?, where: 'cloud' }, so Cloud can count app runs and say which app ran.Why A Cloud app run today posts only the prompt and the sign-in token. Cloud keeps the whole
extra_datawith the job, so the tag reaches Cloud's records with no Cloud change.Before / After
/apps/<id>/. It sends the id only when that slug is on the catalog's Desktop app list (/api/v1/catalog/items?type=app&surface=desktop_starters). Otherwise the tag is left off and the run still goes. A page cannot name another app.run(workflow, { model }). A model that is not a short slug is left out. The bridge version goes to 3. Pages that callrun(workflow)keep working and are tagged by their address. Anappoption from an older page is ignored.Chosen behaviour, different from the ticket:
Seen in production by: none yet; the tab is not in a release.
Not run: The four changed test files were run locally (
appsRun,desktopApps,guards,wiring); CI runs the rest. The tag was not read back from a Cloud job. A test drives the run handler from a page address and checks the request body. The 2026-11-12 smoke test (Remove Background on This computer and on Comfy Cloud, in a dev build of the Apps stack) was before this change and was not repeated.Rule bent: none.
Ref BE-26266