Repository navigation
Device apps (portal): every app drawn from what the API says — no console UI, no console detection - #1336
Device apps (portal): every app drawn from what the API says — no console UI, no console detection#1336evanrbowers wants to merge 1 commit into
Conversation
…sole UI, no console detection
The portal had a part of its own for one app: FIRST_PARTY_APPS = {console} (ConsoleApp: its icon, state words,
ai_commands label, host key, Open terminal) and a console service found by type 28 at host remoteit-console
(sshHelper isConsoleService, in the services' rows, the connect panel and the device's name on this machine). An app
anyone ships could have none of it (presence-contract docs/self-contained-apps.md, the portal's row and
"Capabilities, as the platform keeps them"). Now every app is drawn from DeviceApp, CatalogApp and
CatalogAppRelease alone:
- protocol, capabilities, hostKey, sessions and sessionsOpen are read with an app; protocol and capabilities with
a catalogue entry and each release (and a product's app, where the schema has them).
- An app whose service is ssh and that declares person-certificates (sshHelper opensTerminal) opens in web SSH,
with the person's own account, a certificate and its host key checked: Open terminal in the Apps section and on
its page, the terminal button in its device's services and the option in its connect panel (AppTerminal, which
replaces ConsoleTerminal), the plain ssh command and its hint by name. Its service is the one its app names
(DeviceApp.serviceId), or — disabled, naming none — the one at its app host (remoteit-app-<publisher>-<app>);
a device's apps are read only for a service at an app host.
- The app's page says its state in the shared words, its settings in its release's labels and help (ai_commands
included), the key its service presents where the device reports one, and the sessions it serves: how many, and
who, as whom, by an AI and since when for those who manage it. Its icon comes from its protocol.
- What an app asks of remote.it beyond running is said in words beside Runs as root wherever it is offered — the
catalogue, the device's catalogue (from its catalogue entry), the app and its releases, a product's apps — and is
part of every root consent (the device's, the product's, Add's): "Keeps accounts for the people you share with",
"Signs in people by remote.it certificate", "AI commands go through this app".
- This device's Advanced titles an app's on/off and its settings by the API's name and labels (the device by its
UID), puts any app's settings under its row, and says "Not served" for an app that serves a service; only the
device's own settings keep words here.
Until the console declares these (step 3) and its services move to its app host (step 4),
services/consoleUntilDeclared takes the console with no capabilities as declaring ssh, person-accounts,
person-certificates and ssh-exec, and its host remoteit-console as its app host, so it works as before. It is the
only place the portal names the console, and the removal step deletes it with its two calls. SCREENVIEW stays for
ScreenView's old install alone.
Needs graphql's DeviceApp.protocol/capabilities/hostKey/sessions/sessionsOpen and CatalogApp(Release)
.capabilities/protocol: an older graphql refuses these queries.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Superseded by #1340, merged into |
The portal side of step 2/3 of presence-contract
docs/self-contained-apps.md: every app is drawn from what the API says of it — no component and no detection per app.Depends on the graphql PR adding
DeviceApp.protocol,capabilities,hostKey,sessions { id login person via since },sessionsOpenandCatalogApp/CatalogAppRelease.capabilities/.protocol. An older graphql refuses these queries, so graphql ships first. (DeviceProductApp.capabilities/protocolare asked only where the schema has them.)What was replaced
firstPartyApps.tsFIRST_PARTY_APPS = {console},ConsoleApp.tsx(icon, state words,ai_commandslabel/help, host key viasshHostKey, Open terminal)DeviceApps.tsx,DeviceAppPage.tsx): icon fromprotocol; state in the shared words; settings in the release's labels/help;Host key …fromDeviceApp.hostKey; Sessions (count; who/as whom/by an AI/since, for managers); Open terminal for any app whoseprotocolissshand that declaresperson-certificates(AppTerminalAction)sshHelper.isConsoleService(type 28 + hostremoteit-console) inServiceConnectButton,LocalSubnetConnect,BrowserGatewayConnect,DevicePage,ConsoleTerminalsshHelper.opensTerminal(app)+appsHelper.serviceApp(apps, service): the app naming the service (DeviceApp.serviceId), or, while disabled, the one at its app host (remoteit-app-<publisher>-<app>).useServiceAppreads a device's apps only for a service at an app host.ConsoleTerminal.tsxbecomesAppTerminal.tsx(row button, connect-panel option, Apps action), titled by the app's namegraphQLSshHostKeyDeviceApp.hostKey(the terminal itself still checkssshHostKey, as before)useDeviceApps().console,CONSOLEuseDeviceApps(id, { offers: false })skips the catalogue read for parts that add nothingthisDevice/shared.tsxSETTING_TITLES['remoteit.console'],UNDER_SERVICESconsole entry,OPTIONSappSettings(listed, apps): titles from the API (device read by its UID), any<app>.<name>under its app's row, "Not served" for an app that serves a service. Device-level settings (any_port, etc.) unchangedAvailableApphas none), app page, each release, product apps; and in every root consent (device, product, Add dialog; a restricted app says them above Add): "Keeps accounts for the people you share with", "Signs in people by remote.it certificate", "AI commands go through this app"SCREENVIEWstays, used only for ScreenView's old-install migration.Temporary console fallback
frontend/src/services/consoleUntilDeclared.tsis the only place the portal names the console. Until the console declares its capabilities (step 3) and its services move to its app host (step 4), it:remoteit.consolewith no capabilities as declaringssh+person-accounts,person-certificates,ssh-exec(inparsedDeviceApp);remoteit-consoleas atremoteit-app-remoteit-console(inappsHelper).The removal step deletes the file and its two calls (and the two tests marked TEMPORARY). The console's host-key line depends on graphql filling
DeviceApp.hostKeyfor the console (its console hook already has it).Root consent is still asked for root apps only: graphql's
consentRootis about root, so a restricted app's capabilities are said, not consented to.Tests
frontend:tsc --noEmitclean;vitest run2140 passed (216 files);vite buildOK;i18n:extractleaves the catalogs unchanged andi18n:checkpasses (new keys in en/de/es/ja; the console-only keys removed).AppTerminal.test(any ssh+certificate app; not for other protocols/capabilities, other services, an app naming another service; disabled found by host; consent names capabilities),sshHelper.test,appsHelper.test(capability words, icon, app host,serviceApp, console fallback),useDeviceApps.test(useServiceApp,offers: false),DeviceApps.test,DeviceAppPage.test(terminal, host key, capabilities, sessions, API labels),DeviceAppCatalogPage.test/AppsPage.test/AppPage.test/AppAddDialog.test/ProductPolicyApps.test(capabilities and consent),graphQLDeviceApps.test/graphQLAppCatalog.test/productPolicy.test(fields asked and parsed),ThisDevicePage.test(API-driven app settings).🤖 Generated with Claude Code