Skip to content

fix(console): postViewSelection for prototype.stage - #180

Merged
Travis-Gilbert merged 1 commit into
mainfrom
fix/prototype-stage-post-view-selection
Aug 4, 2026
Merged

fix(console): postViewSelection for prototype.stage#180
Travis-Gilbert merged 1 commit into
mainfrom
fix/prototype-stage-post-view-selection

Conversation

@Travis-Gilbert

Copy link
Copy Markdown
Owner

Summary

Test plan

  • Railway commonplace-console build succeeds
  • Typecheck: postViewSelection exported from programClient

The stage view posts explicit selections through programmable_graph run
options; the helper was missing from main and broke the Railway console build.
Copilot AI lite review requested due to automatic review settings August 4, 2026 14:40
@Travis-Gilbert
Travis-Gilbert merged commit 2e24075 into main Aug 4, 2026
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Travis-Gilbert, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 27 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1c1bfb68-e573-42b3-b683-579c3745f90d

📥 Commits

Reviewing files that changed from the base of the PR and between 9346c71 and 22fc1c1.

📒 Files selected for processing (1)
  • apps/console/src/views/program/programClient.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copilot AI left a comment

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.

Pull request overview

This PR extends the console programmable-graph client to support posting explicit View selections from prototype.stage by threading a view_selections bag through the run call options.

Changes:

  • Add ProgramRunOptionsWithView and ExplicitViewSelection types to model Theorem’s run selection payload.
  • Update runProgramDefinition to accept the widened options type (enabling view_selections).
  • Add postViewSelection helper to construct and send a run request with options.view_selections.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 210 to +212
/** Server-authored run events (PG7). Console must not invent ProcessLiveness. */
/** Run options plus the View-selection bag Theorem accepts on `run`. */
export type ProgramRunOptionsWithView = ProgramRunOptions & {
Comment on lines +212 to +214
export type ProgramRunOptionsWithView = ProgramRunOptions & {
readonly view_selections?: Readonly<Record<string, unknown>>;
};
Comment on lines +239 to +245
export async function postViewSelection(input: {
readonly definition: ProgramDefinition;
readonly viewNodeId: string;
readonly selection: ExplicitViewSelection;
readonly programId?: string | null;
readonly invocationId?: string;
}): Promise<ProgramRunReceipt> {
Comment on lines +239 to +258
export async function postViewSelection(input: {
readonly definition: ProgramDefinition;
readonly viewNodeId: string;
readonly selection: ExplicitViewSelection;
readonly programId?: string | null;
readonly invocationId?: string;
}): Promise<ProgramRunReceipt> {
const options: ProgramRunOptionsWithView = {
invocation_id: input.invocationId ?? `view-select-${Date.now()}`,
inputs: {},
tweaks: {},
pinned_nodes: {},
human_answers: {},
environment_store: {},
view_selections: {
[input.viewNodeId]: input.selection,
},
};
return runProgramDefinition(input.definition, options);
}
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.

2 participants