fix(console): postViewSelection for prototype.stage - #180
Conversation
The stage view posts explicit selections through programmable_graph run options; the helper was missing from main and broke the Railway console build.
|
Warning Review limit reached
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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. Comment |
There was a problem hiding this comment.
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
ProgramRunOptionsWithViewandExplicitViewSelectiontypes to model Theorem’srunselection payload. - Update
runProgramDefinitionto accept the widened options type (enablingview_selections). - Add
postViewSelectionhelper to construct and send arunrequest withoptions.view_selections.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /** 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 & { |
| export type ProgramRunOptionsWithView = ProgramRunOptions & { | ||
| readonly view_selections?: Readonly<Record<string, unknown>>; | ||
| }; |
| export async function postViewSelection(input: { | ||
| readonly definition: ProgramDefinition; | ||
| readonly viewNodeId: string; | ||
| readonly selection: ExplicitViewSelection; | ||
| readonly programId?: string | null; | ||
| readonly invocationId?: string; | ||
| }): Promise<ProgramRunReceipt> { |
| 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); | ||
| } |
Summary
postViewSelection+ProgramRunOptionsWithViewsoprototype.stagecan post explicit{entity_path, expr_id}selections.Test plan
commonplace-consolebuild succeedspostViewSelectionexported fromprogramClient