Skip to content

Add server-driven Connections catalog#513

Merged
matthewlouisbrockman merged 1 commit into
mainfrom
launchdarkly-connections-catalog
Jul 16, 2026
Merged

Add server-driven Connections catalog#513
matthewlouisbrockman merged 1 commit into
mainfrom
launchdarkly-connections-catalog

Conversation

@matthewlouisbrockman

@matthewlouisbrockman matthewlouisbrockman commented Jul 16, 2026

Copy link
Copy Markdown
Contributor
  • add a server-only LaunchDarkly JSON catalog for team-targeted Connections entries
  • merge flagged entries with declared connections and launch templates in the current team's terminal

Keep unreleased connection metadata in a server-only, team-targeted LaunchDarkly payload while preserving declared entries and existing client flag defaults.
@cla-bot cla-bot Bot added the cla-signed label Jul 16, 2026
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web-foxtrot Ready Ready Preview, Comment Jul 16, 2026 10:20pm

Request Review

@cursor

cursor Bot commented Jul 16, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Scoped dashboard UI and server-side feature-flag plumbing with validation and tests; no auth or payment changes.

Overview
Implements the Connections dashboard page behind connectionsEnabled, listing merged catalog entries with Start links that open the team terminal with a template query param.

Adds a server-only developmentConnections LaunchDarkly JSON payload (Zod-validated) for team-targeted entries, merged with in-repo DECLARED_CONNECTIONS via mergeConnectionCatalog (declared wins on template collisions; extras deduped). Boolean flags move to boolean-definitions.ts so the client bundle no longer pulls payload schemas; getPayload on the server service and evaluateAll now skips exposure: 'server' flags.

Reviewed by Cursor Bugbot for commit 7adb098. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7adb098. Configure here.

slug: teamSlug,
},
}
featureFlagContext

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Connections page omits team slug

Medium Severity

The Connections page builds featureFlagContext with only team.id, while the dashboard layout evaluates client flags (including connectionsEnabled for the sidebar) with team.id and team.slug. LaunchDarkly evaluations for the same flag can disagree when targeting uses the team slug attribute, so the sidebar can show Connections while the page returns notFound(), or the reverse.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7adb098. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i don't care about the slug

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

everything's just evaluated on the id

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

imma go take the slug out, i guess sidebar didn't need it. unless it did i don't remember was the far off times of... yesterday

@claude claude 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.

No bugs found, but this PR introduces a new payload-flag mechanism for feature flags (used to drive a new Connections page) alongside a refactor splitting boolean vs. payload flag definitions, so I think it's worth a human look before merging.

Extended reasoning...

Overview

This PR builds out the Connections page: it adds a real UI (replacing a stub that returned null), a DECLARED_CONNECTIONS/mergeConnectionCatalog catalog in src/features/dashboard/connections/catalog.ts, and a new generic payload feature-flag kind (developmentConnections) that lets ops inject additional connection entries via LaunchDarkly. It also refactors definitions.ts by extracting all boolean flags into a new boolean-definitions.ts module and adds a getPayload method to the feature-flag service, plus filters evaluateAll to exclude server-only flags from client exposure.

Security risks

No significant issues found. The new developmentConnections payload flag is exposure: 'server' only, so it's never sent to the client bundle. Its template field is constrained by a strict regex (^[a-zA-Z0-9][a-zA-Z0-9_.:/-]{0,127}$) and the payload is validated with zod, with a safe fallback to the default (empty array) on parse failure. The template value is only used inside URLSearchParams (auto-encoded) and as a React key/text node (auto-escaped), so no injection risk there.

Level of scrutiny

This is a moderate-risk change: it's not just a config tweak — it restructures the feature-flag definitions module (a shared core dependency used across the app) and introduces a new flag kind (payload) with its own validation/fallback path. That's an architectural decision (how future payload-based flags are declared and consumed) that a human should sanity-check, even though the bug hunter found nothing and test coverage is solid (catalog merge/dedup, payload validation fallback, client-vs-server exposure filtering, and page rendering are all covered).

Other factors

The diff is well-tested and self-contained, and the terminal page's handling of the template query param is pre-existing behavior, not something this PR changes. I don't see outstanding unaddressed reviewer comments in the available PR data.

@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: 7adb09881c

ℹ️ 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 +49 to +51
team: {
id: teamId.data,
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the team slug in feature-flag context

When either LaunchDarkly flag is targeted by team.slug, this context now omits that attribute, so createOpenFeatureEvaluationContext sends a team context with no slug and the matching rollout returns its default instead. This regresses the previous Connections-page behavior (and differs from the Agents/BYOC pages), causing slug-targeted connectionsEnabled rollouts to 404 or slug-targeted developmentConnections payloads to be empty; include slug: teamSlug alongside the resolved ID.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

pulling out the slugs in another PR

@matthewlouisbrockman
matthewlouisbrockman merged commit 06121fd into main Jul 16, 2026
15 checks passed
@matthewlouisbrockman
matthewlouisbrockman deleted the launchdarkly-connections-catalog branch July 16, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants