Skip to content

Conversation

@camielvs
Copy link
Collaborator

@camielvs camielvs commented Jan 27, 2026

Description

Adds a free text field to pipeline runs context panel so users can note down any thoughts or comments.

If the viewing user is not the creator of the run they will not be able to edit the notes.

Also adds an input field to the "Submit Run with Task Arguments" dialog, so that users can enter notes at the time they submit the run.

pipeline-and-run-notes-demo.mov (uploaded via Graphite)

Related Issue and Pull requests

Closes https://github.com/Shopify/oasis-frontend/issues/157

Type of Change

  • New feature

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

image.png

image.png

image.png

Test Instructions

  • Can add & edit notes on a Pipeline Run
  • Can add a note when submitting a run with arguments
  • Can READONLY Pipeline Run notes when not the creator of the run
  • Run Notes do not copy over when the pipeline is rerun

Additional Comments

Copy link
Collaborator Author

camielvs commented Jan 27, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@camielvs camielvs mentioned this pull request Jan 27, 2026
3 tasks
@camielvs camielvs force-pushed the 01-26-feat_user_notes_on_runs branch 2 times, most recently from f3dc9c4 to 48ace2d Compare January 28, 2026 00:05
@camielvs camielvs force-pushed the 01-26-feat_user_notes_on_pipelines branch from 242fda8 to 25910f5 Compare January 28, 2026 00:05
@camielvs camielvs force-pushed the 01-26-feat_user_notes_on_runs branch 3 times, most recently from 2693c74 to 9eac2b7 Compare January 28, 2026 00:49
@camielvs camielvs marked this pull request as ready for review January 28, 2026 01:44
@camielvs camielvs requested a review from a team as a code owner January 28, 2026 01:44
const notify = useToastNotification();
const navigate = useNavigate();

const runNotes = useRef<string>("");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Using ref here smells - why do we need it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, moving annotations to "submitPipeline" as an initial payload will solve this problem automatically

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Due to the chaining of queries a useState was not updating correctly and thus passing stale values.

You are correct that using submitPipelineRun to save the annotation alongside the run in one go will fix this, however, submitting annotations via that API does not work as expected.

Copy link
Collaborator

@maxy-shpfy maxy-shpfy left a comment

Choose a reason for hiding this comment

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

I wish the API /api/pipeline_runs/?include_pipeline_names=true&include_execution_stats=true return some annotations as well so we can display notes in the list. - I believe that could be valuable in some cases.

Comment on lines +108 to +112
const { mutate: saveNotes } = useMutation({
mutationFn: (runId: string) =>
updateRunNotes(runId, backendUrl, runNotes.current),
});

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would change that to send annotations immediately on Run creation, and not AFTER it was created - it will simplify the logic significantly. See https://github.com/TangleML/tangle-ui/blob/master/src/utils/submitPipeline.ts#L63-L65

Copy link
Collaborator Author

@camielvs camielvs Jan 28, 2026

Choose a reason for hiding this comment

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

it will simplify the logic significantly

It does and I initially tried this. But unless I'm using or understanding the API incorrectly it does not work. Annotations set via submitPipelineRun do not appear when calling GET /api/pipeline_runs/{id}/annotations/ suggesting that the two sets of annotations are stored differently

Copy link
Collaborator

@maxy-shpfy maxy-shpfy left a comment

Choose a reason for hiding this comment

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

I believe you should send annotations immediately on the Run creation, and not AFTER it was created - it will simplify the logic significantly. See https://github.com/TangleML/tangle-ui/blob/master/src/utils/submitPipeline.ts#L63-L65

@camielvs camielvs force-pushed the 01-26-feat_user_notes_on_runs branch from 9eac2b7 to 9de647c Compare January 28, 2026 23:28
@camielvs camielvs force-pushed the 01-26-feat_user_notes_on_pipelines branch 2 times, most recently from 0384a19 to 5606e42 Compare January 28, 2026 23:39
@camielvs camielvs force-pushed the 01-26-feat_user_notes_on_runs branch from 9de647c to c4ee73e Compare January 28, 2026 23:39
Copy link
Collaborator Author

^ I tried this. Unfortunately it seems that sending annotations alongside the POST /api/pipeline_runs/ doesn't work or behave as expected. I tried multiple things with the API and found that only the explicit PUT /api/pipeline_runs/{id}/annotations/{key} route works for setting annotations on an execution.

However, I could have missed something or misunderstand the API, so we can pair on this to dive deeper.

@camielvs camielvs force-pushed the 01-26-feat_user_notes_on_runs branch from c4ee73e to 4aa5346 Compare January 29, 2026 00:19
@camielvs camielvs requested a review from Mbeaulne January 29, 2026 00:21
@camielvs camielvs force-pushed the 01-26-feat_user_notes_on_runs branch from 4aa5346 to af329da Compare January 29, 2026 00:28
@camielvs camielvs force-pushed the 01-26-feat_user_notes_on_pipelines branch from 5606e42 to 5b52fc6 Compare January 29, 2026 00:28
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