[go: up one dir, main page]

Skip to content

[Real time MR] Update MR Changes count in real time

This discussion thread makes it clear that we need to work on adding a real time update to the Changes count on the MR page.

Some parts to consider:

  • We need an "indeterminate" state where we don't just assume that 0 == unknown.
    • The Rails-rendered page assumes either a number >0 or -, so we'd need to conceptually identify "we don't know" there
    • The front end also basically assumes "some value" - although that value could in theory just be "-"
    • When the back end is still computing the diff (async), the diff files are reported as []. This may be overly simplified.
    • Adding an indeterminate middle state between 0 and [any other number] requires a little bit of thinking about how this display is computed
  • The changes tab needs a count applied before the diffs tab is loaded.
    • We used to start the Diffs app on any tab to load the diffs_metadata, but that was removed
    • We need an "app-agnostic" metadata loader to get this type of info (in real time) at a level higher than the [Notes|Diffs] apps.

Given the above, it makes sense to separate "the diffs [app]" from "the MR metadata", since those two things are only currently related due to the ad hoc construction of the apps.
We need a higher-level abstraction of certain metadata (most notable in this case: the file count) outside of the various Apps, at the page level.

Edited by Thomas Randolph