Skip to content

Fix community skill catalog installs#19

Merged
dbalders merged 7 commits into
tritongptfrom
fix-community-skill-add
Jun 21, 2026
Merged

Fix community skill catalog installs#19
dbalders merged 7 commits into
tritongptfrom
fix-community-skill-add

Conversation

@dbalders

@dbalders dbalders commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • allow catalog installs to pick the UCSD OpenCode skills directory when OpenCode reports no existing skills
  • adopt matching existing skill folders instead of failing/reverting to Add
  • avoid the stale provider refresh in the install RPC that could overwrite the successful install response

Validation

  • ./node_modules/.bin/vp test run src/provider/installProviderSkill.test.ts src/provider/removeProviderSkill.test.ts
  • ./node_modules/.bin/vp run typecheck
  • ./node_modules/.bin/vp check
  • isolated UI smoke: UCSD Branding changed from Available/Add to Enabled without install error

Summary by CodeRabbit

  • Bug Fixes

    • Provider skill installation now finds and targets the correct OpenCode skills directory using the effective environment (including improved UCSD config discovery).
    • Refresh/install now updates existing SKILL.md only when the frontmatter name matches; otherwise installation fails with a more specific error.
    • Re-install/merge now re-enables the skill and normalizes scope, including re-merging previously present linked skills.
    • Skills path registration is updated during refresh/installation to reflect the active UCSD layout.
  • Improvements

    • The install RPC updates the in-memory provider list immediately for the response, without refreshing the whole provider inventory.
  • Tests

    • Expanded installer, merge, and provider-registry caching coverage.

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 39d35375-923a-424a-ad6a-87ab75a0acf8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

A new recordInstalledProviderSkill method is added to the provider registry to update cached provider snapshots with newly installed skills. The ProviderInstance interface is extended with an environment field exposing merged process environment, propagated through all driver implementations. The installProviderSkill function gains UCSD OpenCode config fallback directory resolution and logic to adopt existing matching skill directories instead of rejecting them. An optional environment parameter threads through the call chain to support this fallback. The WS handler is simplified to use the new registry capability instead of refreshing the provider. Comprehensive test coverage is added for adoption, UCSD fallback, name conflicts, and skill re-enablement. Browser tests are updated to use the opencode provider instead of codex and claudeAgent instances.

Changes

Provider Skill Installation: Registry Capability, UCSD Fallback, and Skill Adoption

Layer / File(s) Summary
ProviderInstance environment field contract and driver implementations
apps/server/src/provider/ProviderDriver.ts, apps/server/src/provider/Drivers/ClaudeDriver.ts, apps/server/src/provider/Drivers/CodexDriver.ts, apps/server/src/provider/Drivers/CursorDriver.ts, apps/server/src/provider/Drivers/GrokDriver.ts, apps/server/src/provider/Drivers/OpenCodeDriver.ts, apps/server/src/provider/Layers/OpenCodeExternalSessionSync.test.ts, apps/server/src/provider/Layers/ProviderAdapterRegistry.test.ts, apps/server/src/provider/Layers/ProviderRegistry.test.ts, apps/server/src/textGeneration/TextGeneration.test.ts
ProviderInstance interface declares readonly environment: NodeJS.ProcessEnv field. All five drivers set this field to their computed processEnv in create() methods. Test helpers across multiple files are updated to include empty environment: {} to match the expanded shape.
ProviderRegistry recordInstalledProviderSkill service and implementation
apps/server/src/provider/Services/ProviderRegistry.ts, apps/server/src/provider/Layers/ProviderRegistry.ts
Adds recordInstalledProviderSkill(instanceId, skillName, skillPath) to the registry service and implementation. The method finds the provider by instanceId, enables matching skill by skillPath/skillName with scope defaulting to "user", or appends a new enabled skill entry, sorts by name, and persists via upsertProviders. Returns existing providers unchanged if provider not found.
ProviderRegistry recordInstalledProviderSkill test
apps/server/src/provider/Layers/ProviderRegistry.test.ts
New effect test that creates a mocked provider with a disabled installed skill, calls recordInstalledProviderSkill to re-enable it, adds a second skill, and verifies both the returned provider snapshots and that getProviders reflects the updated cached state.
Test mocks for recordInstalledProviderSkill
apps/server/src/provider/providerMaintenanceRunner.test.ts, apps/server/src/provider/testUtils/providerRegistryMock.ts, apps/server/src/server.test.ts
Updates three test mock locations to include recordInstalledProviderSkill method satisfying the expanded ProviderRegistryShape. Adds ProviderInstanceRegistry mock to server.test.ts alongside ProviderRegistry mock.
WS handler serverInstallProviderSkill registry integration
apps/server/src/ws.ts
serverInstallProviderSkill now fetches ProviderInstance via providerInstanceRegistry, conditionally passes its environment to installProviderSkill, then calls recordInstalledProviderSkill to produce updated providers. Returns the installed skill augmented with providers. Removes prior provider refresh logic and stops importing mergeInstalledProviderSkill.
UCSD OpenCode config fallback and skill adoption in installProviderSkill
apps/server/src/provider/installProviderSkill.ts
resolveProviderSkillsDirectory and installSkillBundle gain optional environment?: NodeJS.ProcessEnv parameter. When provider skills root unavailable, fallback checks OPENCODE_CONFIG (validated to UCSD config) or falls back to ${HOME}/.agents/ucsd/config/opencode/opencode.json, returning ucsd/skills directory. When target skill directory exists, checks for existing SKILL.md, parses frontmatter name, proceeds only if name matches requested skillName (re-registering in config); missing SKILL.md or name mismatch produce targeted errors. mergeInstalledProviderSkill now re-enables already-present skills, normalizes scope to "user", and sorts by name. Adds node:os import and helper functions writeSkillBundleFiles and registerInstalledSkillDirectory.
installProviderSkill test helpers and comprehensive coverage
apps/server/src/provider/installProviderSkill.test.ts
Introduces makeProviderWithSkills(skills) and refactors makeProvider to delegate to it. Adds ServerProviderSkillBundle import and encodeTestSkillBundle constant. Adds five new test cases: adoption of existing matching catalog skill directory, adoption with UCSD config registration, install-to-UCSD-root when provider has no skills, rejection when OPENCODE_CONFIG is not UCSD-shaped, rejection when existing skill name conflicts with catalog entry. Extends mergeInstalledProviderSkill test to verify re-enablement of existing disabled skills.

Browser Test Provider Instance Updates to Opencode

Layer / File(s) Summary
Bootstrap test provider configuration and flow updates
apps/web/src/components/ChatView.browser.tsx
Updates "custom provider instance ids" bootstrap test to use opencode_openrouter custom instance. Rewrites serverConfig.providers and settings.providerInstances to use opencode driver. Updates model identifiers (Claude Opus 4.7 → 4.8). Adds explicit waitForServerConfigToApply, sets composer draft model selection after config ready, and asserts provider model picker reflects new model before validating bootstrap payload.
Model-picker test snapshots and fixture provider updates
apps/web/src/components/ChatView.browser.tsx
Updates model-picker shortcut test snapshots to use opencode provider instances: project defaultModelSelection.instanceId changes from codex to opencode, thread modelSelection.instanceId from codex to opencode, both preserving gpt-5.4 model. Updates fixture's first provider entry to use opencode driver and instanceId.
Skill-tooltip test provider mutation and synchronization
apps/web/src/components/ChatView.browser.tsx
Expands skill-tooltip test provider mutation to set driver/instanceId to opencode and inject agent-browser skills. Adds synchronization to wait for server config application and composer editor availability before setting prompt and proceeding with skill hover assertions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 A new skill registry takes the stage,
Recording changes on the provider's page!
UCSD paths fold in with grace,
Existing skills find their proper place.
Opencode now leads the browser's way,
Our bunny's built a better day! 🌿

Suggested labels

size:XL

Possibly related PRs

  • dbalders/t3code#14: Both PRs modify driver create() methods; PR #14 establishes per-instance environment merging, while this PR exposes the merged environment on the returned ProviderInstance and uses it for UCSD config fallback resolution during skill installation.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix community skill catalog installs' clearly describes the main objective of the PR and is directly related to the core changes addressing catalog installation issues.
Description check ✅ Passed The PR description covers the key changes (UCSD directory selection, adopting existing skill folders, removing stale refresh), provides validation steps, and UI testing results. It aligns with the template's 'What Changed' and 'Why' sections.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-community-skill-add

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jun 20, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 131150a284

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment thread apps/server/src/ws.ts Outdated
...installed,
providers: mergeInstalledProviderSkill({
providers: refreshedProviders,
providers,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Refresh the provider registry after installing

Using the pre-install providers snapshot here means the RPC response is patched for this caller, but ProviderRegistry itself is never updated. In the normal install flow, a reconnect or any later RPC that reads providerRegistry.getProviders (for example remove/disable, which validate the skill against the current provider inventory) will still see the old snapshot and can report the newly installed skill as missing until some unrelated refresh happens.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

@codex review

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/server/src/provider/installProviderSkill.test.ts (1)

145-185: ⚡ Quick win

Cover UCSD config registration in the adoption test.

This test uses the non-UCSD installTestSkillRoot, so it would still pass if the adoption path stopped calling registerUcsdOpenCodeSkillPath. Please add a UCSD-shaped config/root assertion here, or add a sibling test that adopts an existing folder and verifies opencode.json gains the adopted skill directory in skills.paths.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/server/src/provider/installProviderSkill.test.ts` around lines 145 -
185, The test for the adoption of an existing catalog skill folder uses the
non-UCSD installTestSkillRoot helper, which means it would not catch if the
adoption flow stopped calling registerUcsdOpenCodeSkillPath. Add assertions to
verify UCSD-specific behavior by checking that the opencode.json configuration
file is properly updated with the adopted skill directory path in its
skills.paths array, or alternatively create a sibling test that specifically
validates this UCSD config registration behavior during skill adoption.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/server/src/provider/installProviderSkill.ts`:
- Around line 852-867: The issue is that when OPENCODE_CONFIG is explicitly set
but resolveUcsdConfigSkillsDirectory returns a falsy skillsDirectory, the code
silently skips it and falls through to use the HOME candidate, allowing skills
to be installed under the wrong OpenCode profile. Fix this by throwing a
targeted error when configuredPath is truthy but skillsDirectory resolution
fails, instead of continuing. Only use the HOME candidate path when
OPENCODE_CONFIG is absent (configuredPath is falsy or not set).

---

Nitpick comments:
In `@apps/server/src/provider/installProviderSkill.test.ts`:
- Around line 145-185: The test for the adoption of an existing catalog skill
folder uses the non-UCSD installTestSkillRoot helper, which means it would not
catch if the adoption flow stopped calling registerUcsdOpenCodeSkillPath. Add
assertions to verify UCSD-specific behavior by checking that the opencode.json
configuration file is properly updated with the adopted skill directory path in
its skills.paths array, or alternatively create a sibling test that specifically
validates this UCSD config registration behavior during skill adoption.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b3145e97-f5ed-4940-816a-e944cb3c7e4c

📥 Commits

Reviewing files that changed from the base of the PR and between 80421d9 and 131150a.

📒 Files selected for processing (3)
  • apps/server/src/provider/installProviderSkill.test.ts
  • apps/server/src/provider/installProviderSkill.ts
  • apps/server/src/ws.ts

Comment thread apps/server/src/provider/installProviderSkill.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 44aa15ce9f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment on lines +457 to +458
skill.path === input.skillPath || skill.name === input.skillName
? { ...skill, enabled: true, scope: skill.scope ?? "user" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Replace stale skill entries with the installed path

When the provider snapshot already contains a skill with the same name but a different path (for example a stale cached/plugin entry while this install writes the UCSD skills folder), this branch matches it but only flips enabled, leaving the old path in the RPC response and provider cache. Downstream operations validate and remove skills by skill.path, so the UI will continue to manage the stale location instead of the newly installed input.skillPath; update the matched entry's name/path from the install result or only match by path here.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/server/src/provider/Layers/ProviderRegistry.ts`:
- Around line 455-459: In the skill remapping logic within ProviderRegistry.ts
around lines 457-458, the matched skill is being updated with enabled and scope
properties, but the canonical identity fields are not synchronized with the
input. When a skill matches on one field (e.g., same name but new path), the
updated object should also include input.skillName and input.skillPath in the
spread operation to ensure the cached snapshot reflects the current canonical
identity rather than retaining stale path or name values. Update the object
construction in the ternary operator to include name: input.skillName and path:
input.skillPath along with the existing enabled and scope updates.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a9311a69-6991-4e9f-b359-1acb0fae8c5c

📥 Commits

Reviewing files that changed from the base of the PR and between 131150a and 17bb90d.

📒 Files selected for processing (9)
  • apps/server/src/provider/Layers/ProviderRegistry.test.ts
  • apps/server/src/provider/Layers/ProviderRegistry.ts
  • apps/server/src/provider/Services/ProviderRegistry.ts
  • apps/server/src/provider/installProviderSkill.test.ts
  • apps/server/src/provider/installProviderSkill.ts
  • apps/server/src/provider/providerMaintenanceRunner.test.ts
  • apps/server/src/provider/testUtils/providerRegistryMock.ts
  • apps/server/src/server.test.ts
  • apps/server/src/ws.ts
✅ Files skipped from review due to trivial changes (1)
  • apps/server/src/server.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/server/src/ws.ts
  • apps/server/src/provider/installProviderSkill.ts

Comment thread apps/server/src/provider/Layers/ProviderRegistry.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 17bb90d629

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

return Effect.gen(function* () {
const fs = yield* FileSystem.FileSystem;
const pathService = yield* Path.Path;
const environment = input.environment ?? process.env;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use the selected OpenCode instance environment for fallback

When an OpenCode provider reports no skills, this path falls back to process.env unless the caller passes environment, but the websocket install RPC only passes the provider snapshot/request and OpenCode instances can have per-instance env such as OPENCODE_CONFIG or HOME merged when probing. For an instance whose config lives outside the server process env, the first skill install is written to the process user's UCSD config (or rejected by an unrelated process OPENCODE_CONFIG) rather than the selected provider's config, so that provider never sees the installed skill. Plumb the effective instance environment into this fallback or avoid process-wide defaults for instance-scoped installs.

Useful? React with 👍 / 👎.

@dbalders

Copy link
Copy Markdown
Owner Author

@codex review

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

@dbalders Sure, triggering a review of the PR now!

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8261ae6f66

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

return Effect.gen(function* () {
const fs = yield* FileSystem.FileSystem;
const pathService = yield* Path.Path;
const environment = input.environment ?? process.env;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Resolve fallback skills dir from the target instance env

When the selected OpenCode instance has no reported skills and is configured via providerInstances.*.environment (for example its own OPENCODE_CONFIG/HOME for a custom or secondary instance), the install RPC does not pass that effective instance environment into this helper, so this fallback reads the server process environment instead. In that scenario the skill is installed and registered under the default process ~/.agents/ucsd config while the target OpenCode process continues using its separate config and never sees the skill, even though the RPC returns success for that instance. The fallback should use the target provider instance's effective environment or fail rather than defaulting to process.env.

Useful? React with 👍 / 👎.

Comment on lines +932 to +936
if (existingFrontmatter.name !== skillName) {
return yield* installError(
`Skill '${skillName}' cannot be installed because ${skillDirectory} already contains skill '${existingFrontmatter.name}'.`,
);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Verify existing skill contents before adopting it

In the existing-folder path, this name check is the only compatibility check before returning success without copying any files from the requested bundle. If a prior failed/stale install left SKILL.md with the same frontmatter name but missing or outdated companion files, reinstalling a catalog or linked skill reports success and registers the path while leaving the requested bundle absent or incomplete. Please either verify the existing folder matches the bundle or merge/replace the bundle files before returning.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/web/src/components/ChatView.browser.tsx (1)

7428-7435: ⚡ Quick win

Prefer immutable fixture updates over in-place mutation.

The current implementation uses a type assertion to strip readonly modifiers and mutate the provider object directly. This pattern can lead to subtle bugs if the fixture object is reused across tests or if mutation order matters.

♻️ Suggested immutable update pattern
-      const mutableProvider = provider as {
-        driver: ServerConfig["providers"][number]["driver"];
-        instanceId: ServerConfig["providers"][number]["instanceId"];
-        skills: ServerConfig["providers"][number]["skills"];
-      };
-      mutableProvider.driver = ProviderDriverKind.make("opencode");
-      mutableProvider.instanceId = ProviderInstanceId.make("opencode");
-      mutableProvider.skills = [
+      nextFixture.serverConfig.providers[0] = {
+        ...provider,
+        driver: ProviderDriverKind.make("opencode"),
+        instanceId: ProviderInstanceId.make("opencode"),
+        skills: [
-        {
-          name: "agent-browser",
-          displayName: "Agent Browser",
-          description: "Open pages, click around, and inspect web apps.",
-          path: "/Users/test/.agents/skills/agent-browser/SKILL.md",
-          enabled: true,
-        },
-      ];
+          {
+            name: "agent-browser",
+            displayName: "Agent Browser",
+            description: "Open pages, click around, and inspect web apps.",
+            path: "/Users/test/.agents/skills/agent-browser/SKILL.md",
+            enabled: true,
+          },
+        ],
+      };
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/components/ChatView.browser.tsx` around lines 7428 - 7435, The
code uses a type assertion to strip readonly modifiers and then mutates the
provider object directly, which can cause bugs if the fixture is reused. Instead
of casting the provider and mutating its properties (driver, instanceId, and
skills), create a new object using an immutable update pattern such as spreading
the original provider and overriding only the properties that need to change.
This way, the original provider remains unchanged and you avoid the unsafe type
assertion that removes readonly protections.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@apps/web/src/components/ChatView.browser.tsx`:
- Around line 7428-7435: The code uses a type assertion to strip readonly
modifiers and then mutates the provider object directly, which can cause bugs if
the fixture is reused. Instead of casting the provider and mutating its
properties (driver, instanceId, and skills), create a new object using an
immutable update pattern such as spreading the original provider and overriding
only the properties that need to change. This way, the original provider remains
unchanged and you avoid the unsafe type assertion that removes readonly
protections.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: de590610-1d96-474f-b71f-739fa38faf35

📥 Commits

Reviewing files that changed from the base of the PR and between 17bb90d and 8261ae6.

📒 Files selected for processing (5)
  • apps/server/src/provider/Layers/ProviderRegistry.test.ts
  • apps/server/src/provider/Layers/ProviderRegistry.ts
  • apps/server/src/provider/installProviderSkill.test.ts
  • apps/server/src/provider/installProviderSkill.ts
  • apps/web/src/components/ChatView.browser.tsx
🚧 Files skipped from review as they are similar to previous changes (4)
  • apps/server/src/provider/Layers/ProviderRegistry.test.ts
  • apps/server/src/provider/Layers/ProviderRegistry.ts
  • apps/server/src/provider/installProviderSkill.test.ts
  • apps/server/src/provider/installProviderSkill.ts

@dbalders

Copy link
Copy Markdown
Owner Author

@codex review

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

@dbalders Sure, triggering a review of the PR now!

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a74fa4452

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

return Effect.gen(function* () {
const fs = yield* FileSystem.FileSystem;
const pathService = yield* Path.Path;
const environment = input.environment ?? process.env;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use the target OpenCode instance environment for first installs

When the target OpenCode instance has OPENCODE_CONFIG or HOME set only via its provider-instance environment and reports no skills yet, this fallback reads the server process environment instead because the install RPC calls installProviderSkill without an environment. That means the first catalog install for that instance can fail with “no UCSD OpenCode config” or install into the server user’s default ~/.agents/ucsd tree rather than the config OpenCodeDriver actually uses for the instance.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@dbalders

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions github-actions Bot added size:XL and removed size:L labels Jun 21, 2026
@dbalders
dbalders merged commit 38a125a into tritongpt Jun 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant