Skip to content

Conversation

@doc-han
Copy link
Contributor

@doc-han doc-han commented Jan 6, 2026

Description

This PR shows a red dot indicator on the save button when there are unsaved changes in a workflow.
Screenshot 2026-01-08 at 8 38 42 AM

Closes #3682

Validation steps

  1. Open a workflow
  2. Make some changes to a job/edge
  3. Do you see a red dot showing that some unsaved changes exist? we expect a yes

If you're seeing a red dot right upon entering a workflow, it means there already exist unsaved changes(between what's in the DB and what's on ydoc).

Additional notes for the reviewer

  1. (Is there anything else the reviewer should know or look out for?)

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

Pre-submission checklist

  • I have performed a self-review of my code.
  • I have implemented and tested all related authorization policies. (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

@doc-han doc-han linked an issue Jan 6, 2026 that may be closed by this pull request
6 tasks
@github-project-automation github-project-automation bot moved this to New Issues in v2 Jan 6, 2026
@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.32%. Comparing base (e46806e) to head (99c0c8d).

Files with missing lines Patch % Lines
lib/lightning_web/channels/workflow_channel.ex 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4289      +/-   ##
==========================================
- Coverage   89.37%   89.32%   -0.05%     
==========================================
  Files         425      425              
  Lines       19940    19941       +1     
==========================================
- Hits        17821    17812       -9     
- Misses       2119     2129      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@doc-han doc-han marked this pull request as ready for review January 8, 2026 10:19
@taylordowns2000 taylordowns2000 changed the title feat: unsaved changes indicator Unsaved changes indicator Jan 8, 2026
Copy link
Member

@taylordowns2000 taylordowns2000 left a comment

Choose a reason for hiding this comment

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

noting project_credential_id from our call! ping when ready to test again please :-)

Copy link
Member

@taylordowns2000 taylordowns2000 left a comment

Choose a reason for hiding this comment

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

works great @doc-han . i've requested a review from @stuartc since he worked on this also before the break.

two things (not blocking for me):

  1. see comment on the hard-coded expected structure. is there another way?
  2. check out the issue (and comment) here about warning on unsaved changes... i think it would be really nice to finally tell users "hey, you're about to navigate away with unsaved stuff" and I wonder if this new function allows us to do that?

Copy link
Collaborator

@lmac-1 lmac-1 left a comment

Choose a reason for hiding this comment

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

Most of my review comments are low priority / nice-to-haves and shouldn't block merging.

But I noticed that "Allow console.log() usage" (workflow.enable_job_logs) and "Max concurrency" (workflow.concurrency) don't trigger the unsaved changes dot. This should be addressed before merging.

image

@doc-han doc-han force-pushed the 3682-implement-unsaved-changes-indicator-red-dot-in-react branch from 6019a36 to c8d7d08 Compare January 16, 2026 08:27
@doc-han doc-han requested review from lmac-1 and stuartc January 16, 2026 11:15
@doc-han
Copy link
Contributor Author

doc-han commented Jan 16, 2026

Thanks for the reviews @lmac-1 @stuartc. All change requests resolved. Please take a look once again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Implement Unsaved Changes Indicator (Red Dot) in React

5 participants