Skip to content

feat: enable remote profile, gateway, skills, and toolset management - #861

Open
itsJai42 wants to merge 9 commits into
fathah:mainfrom
itsJai42:pr/03-remote-profiles-gateway-tools
Open

feat: enable remote profile, gateway, skills, and toolset management#861
itsJai42 wants to merge 9 commits into
fathah:mainfrom
itsJai42:pr/03-remote-profiles-gateway-tools

Conversation

@itsJai42

Copy link
Copy Markdown
Contributor

Summary

  • route profile listing, switching, and management through the remote dashboard client when the active connection is remote (remote-profiles.ts), rejecting local fallbacks
  • expose remote gateway status/control via the authenticated management transport (remote-gateway.ts)
  • serve skills and platform toolsets from the remote dashboard in remote mode (remote-skills.ts, remote-toolsets.ts)
  • authenticate remote metadata requests and normalize remote dashboard API failures (remote-metadata.ts, messaging-platforms.ts)
  • ungate the Profiles, Skills, Tools, and Gateway screens in remote mode now that real remote backends exist; Discover, Providers, Memory, and Kanban remain gated with RemoteNotice
  • document the remote-management architecture in lat.md/remote-management.md

Builds on the remote management client from #855. Preserves the readiness boundary: non-remote connections are rejected at the request boundary and probe failures never guess or fall back to local state.

Verification

  • focused Vitest (remote-profiles, remote-gateway, remote-skills, remote-toolsets, remote-metadata-auth, messaging-platforms.remote, remote-management-gates) — 25 passed
  • npm test — 170 files passed; 1,772 tests passed; 3 skipped
  • npm run typecheck — passed (node + web)
  • changed-file ESLint — 0 errors
  • changed-file Prettier check — passed
  • lat check — passed
  • git diff --check upstream/main...HEAD — passed

No live remote-dashboard end-to-end session was performed; verification is automated source behavior and repository validation.

@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR enables authenticated remote management across the desktop app. The main changes are:

  • Remote profile and Soul management through dashboard APIs.
  • Remote gateway lifecycle and messaging controls.
  • Remote skill and toolset reads and mutations.
  • Cookie-aware metadata requests and normalized API failures.
  • Remote-mode access to the Profiles, Skills, Tools, and Gateway screens.
  • Architecture documentation and focused remote-management tests.

Confidence Score: 4/5

Remote profile mutation results need fixes before merging.

  • Profile deletion can report success after the server rejects it.
  • Soul reset can display default content even when the write was rejected.
  • The remaining remote routing and build surfaces are consistent with their callers.

src/main/remote-profiles.ts

Important Files Changed

Filename Overview
src/main/remote-profiles.ts Adds remote profile and Soul operations, but two mutation paths can report success after an explicit rejection.
src/main/ipc/register.ts Routes supported remote management IPC calls to the new adapters.
src/main/remote-gateway.ts Adds profile-scoped gateway status and lifecycle operations.
src/main/remote-skills.ts Moves remote skill operations to the authenticated dashboard transport.
src/main/remote-toolsets.ts Adds profile-scoped remote toolset reads and updates.
src/main/remote-metadata.ts Uses cookie-aware authentication for direct remote metadata requests.
src/main/messaging-platforms.ts Routes remote messaging operations through the shared authenticated request boundary.
src/renderer/src/screens/Layout/Layout.tsx Enables supported management screens while retaining gates for unfinished remote features.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant UI as Renderer
    participant IPC as Electron IPC
    participant Adapter as Remote adapter
    participant API as Dashboard API
    UI->>IPC: Management action(profile)
    IPC->>Adapter: Route remote connection
    Adapter->>API: Authenticated profile-scoped request
    API-->>Adapter: JSON result
    Adapter-->>IPC: Desktop result
    IPC-->>UI: Updated state
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant UI as Renderer
    participant IPC as Electron IPC
    participant Adapter as Remote adapter
    participant API as Dashboard API
    UI->>IPC: Management action(profile)
    IPC->>Adapter: Route remote connection
    Adapter->>API: Authenticated profile-scoped request
    API-->>Adapter: JSON result
    Adapter-->>IPC: Desktop result
    IPC-->>UI: Updated state
Loading

Reviews (1): Last reviewed commit: "Merge remote-tracking branch 'upstream/m..." | Re-trigger Greptile

Comment on lines +89 to +96
await remoteDashboardRequestJson(
connection,
`/api/profiles/${encodeURIComponent(name)}`,
{
method: "DELETE",
},
);
return { success: true };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Rejected Delete Reports Success

When the dashboard returns HTTP 200 with { ok: false }, this path ignores the response and reports { success: true }. The profile remains on the server while the UI treats it as deleted, so it reappears on refresh.

Suggested change
await remoteDashboardRequestJson(
connection,
`/api/profiles/${encodeURIComponent(name)}`,
{
method: "DELETE",
},
);
return { success: true };
const result = await remoteDashboardRequestJson<{ ok?: boolean }>(
connection,
`/api/profiles/${encodeURIComponent(name)}`,
{
method: "DELETE",
},
);
return result?.ok === false
? { success: false, error: "Remote profile deletion failed." }
: { success: true };

Comment on lines +146 to +147
await remoteWriteSoul(connection, DEFAULT_SOUL, profile);
return DEFAULT_SOUL;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Rejected Reset Reports Success

When remoteWriteSoul() receives { ok: false }, it resolves to false, but this function still returns the default Soul. The editor can show a successful reset even though the remote profile kept its previous content.

Suggested change
await remoteWriteSoul(connection, DEFAULT_SOUL, profile);
return DEFAULT_SOUL;
const written = await remoteWriteSoul(connection, DEFAULT_SOUL, profile);
if (!written) throw new Error("Remote Soul reset was rejected.");
return DEFAULT_SOUL;

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