Skip to content

Conversation

@qstearns
Copy link
Contributor

@qstearns qstearns commented Nov 10, 2025

Allows attaching environments to sources for all callers.

This introduces the distinction between a System Environment and User Configuration to the system. These names might be stupid but they attempt to get around the idea that Headers are more of an implementation detail and the rules associated with how you merge these things should be derived from their provenance rather than how they were supplied.

We make some decisions. First off, we complect the call sites of tool proxies by placing the onus of loading on them. This was more or less in the name of purity of the tools proxy. But might be a mistake because it forces the onus of reading system environments to a bunch of places in our code base. It's possible it's a little bug-prone to do this nonsense in a bunch of places.

The other decision, which I feel a little better about is to provide both environments to each tool type and leave the responsibility of merging them at the call site. Even though we aim for consistent behavior (ie. preferring user config over system environment), leaving the flexibility on how to merge each tool type seems healthy.

UX

A dialog attached to source cards. Not good.

Affordance to access functionality is currently buried behind:

image

The interface for attaching an environment is implemented in this modal:

image
  • We use a combobox
  • We try to preview what variables will be set to make more mistakes more obvious
  • Currently pretty ugly, but banking on the UX moving to a new location shortly before I figure out a good hierarchy for presenting. Happy to knock any quick fixes to make this present better if people feel strongly

Things to pay Attention To

  • Moved sources components to new directory, but also changed the modal paradigm (separate content components, used zustand for state management)
  • I ported all of the Dialogs and Dropdown Menu's to the moonshine versions of those components. I couldn't visually tell the difference and there were some really nasty interplay issues. Hoping this is a nice stability move

Considerations

  • Might consider adding a confirmation button considering this action is a pretty serious one
  • UX is quite ugly at the moment. Preferring to follow up with a dedicated sources page instead of burying behind a dialog
  • Blocked on this moonshine PR: feat(Combobox): add create to combobox moonshine#319

@qstearns qstearns requested a review from a team as a code owner November 10, 2025 16:56
@changeset-bot
Copy link

changeset-bot bot commented Nov 10, 2025

🦋 Changeset detected

Latest commit: 26d4ad9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
dashboard Minor
server Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Nov 10, 2025

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

Project Deployment Preview Comments Updated (UTC)
gram Ready Ready Preview Comment Nov 11, 2025 10:50pm
gram-docs-redirect Ready Ready Preview Comment Nov 11, 2025 10:50pm
gram-landing-redirect Ready Ready Preview Comment Nov 11, 2025 10:50pm

@qstearns qstearns force-pushed the quinn/source-environments branch from e1c6218 to 2f9e885 Compare November 10, 2025 17:57
@qstearns qstearns force-pushed the quinn/source-environments branch from 2f9e885 to 6173181 Compare November 10, 2025 18:16
@qstearns qstearns changed the base branch from main to quinn/add-source-environments-table November 10, 2025 18:22
@qstearns qstearns force-pushed the quinn/source-environments branch from 6173181 to 7d03814 Compare November 10, 2025 18:31
@qstearns qstearns force-pushed the quinn/add-source-environments-table branch from 303753a to c665eb6 Compare November 10, 2025 18:32
@qstearns qstearns force-pushed the quinn/source-environments branch from 7d03814 to 5cc8a5f Compare November 10, 2025 18:51
@qstearns qstearns force-pushed the quinn/source-environments branch from 5cc8a5f to cbc03e8 Compare November 10, 2025 19:23
…e such that all tool calls originating from that source will have those environment variables apply
move oauth token into environement resolution

exclude server url when system environments are used

pass through all environment variables not specified by plan
move ci env

switch environment parameter for tool proxy
Note that we're removing explicit map sizing because
map size has become unpredictable
@qstearns qstearns force-pushed the quinn/source-environments branch from c0e4b28 to b5da475 Compare November 11, 2025 21:30
@qstearns qstearns force-pushed the quinn/add-source-environments-table branch from c665eb6 to 3a8611b Compare November 11, 2025 21:30
@github-actions
Copy link
Contributor

github-actions bot commented Nov 11, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

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.

4 participants