Page MenuHomePhabricator

Make "Highlight As..." sticky across reloads in Diffusion and Differential
ClosedPublic

Authored by epriestley on Apr 17 2020, 8:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 2, 9:54 PM
Unknown Object (File)
Jun 5 2025, 4:51 PM
Unknown Object (File)
May 31 2025, 8:23 PM
Unknown Object (File)
May 30 2025, 11:13 AM
Unknown Object (File)
May 29 2025, 11:28 PM
Unknown Object (File)
May 10 2025, 2:09 PM
Unknown Object (File)
May 4 2025, 3:25 AM
Unknown Object (File)
May 2 2025, 6:07 AM
Subscribers
Restricted Owners Package

Details

Summary

Ref T13455. Add container-level storage for persistent view state, and persist "Highlight As..." inside it.

The storage generates a "PhabricatorChangesetViewState" configuration object as an output.

When preferences are expressed on a diff and that diff is later attached to a revision, we attempt to copy the preferences.

The internal storage tracks per-changeset settings, but currently always uses "last update wins" to apply the settings in the UI.

Test Plan
  • Viewed revisions, changed highlighting, reloaded. Saw highlighting stick in revision view and standalone view.
  • Viewed commits, changed highlighting, reloaded. Saw highlighting stick.
  • Created a diff, changed highlighting, turned it into a revision, saw highlighting persist.

Diff Detail

Repository
rP Phabricator
Branch
sticky1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 24152
Build 33259: Run Core Tests
Build 33258: arc lint + arc unit

Event Timeline

Owners added a subscriber: Restricted Owners Package.Apr 17 2020, 8:16 PM

Since these may be prone to heavy usage with arguably minimal value for long-term persistence, you could consider a follow-up revision implementing DifferentialViewStateGarbageCollector.

I think this table won't grow too crazily fast, but it's easy and reasonable to GC so maybe I'll add a GC and just set the default policy to something fairly permissive like "365 days".

This revision was not accepted when it landed; it landed in state Needs Review.Apr 19 2020, 3:58 PM
This revision was automatically updated to reflect the committed changes.

I added a GC in D21164, with a default policy of "180 days".