Skip to content

[WIP] Scene Inventory: Version history panel - #2148

Draft
BigRoy wants to merge 5 commits into
enhancement/browser-workfiles-activity-tabfrom
enhancement/scene-inventory-version-history
Draft

BigRoy wants to merge 5 commits into
enhancement/browser-workfiles-activity-tabfrom
enhancement/scene-inventory-version-history

Conversation

@BigRoy

@BigRoy BigRoy commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Warning

WIP - prototype to get a sense of how viable this is in production. Not ready for review of the details, feedback on the approach is welcome.

Changelog Description

Add a version history panel to the Scene Inventory. A toggle button in the header shows, below the view, the version history of the product of the selected container:

  • versions from the newest to the oldest, with the loaded and the latest one marked,
  • thumbnail, status, author, date and publish comment of each version,
  • the activity (comments, status changes) of the version selected in the list.

The panel is hidden by default and shares the height of the window with the view, so it never makes the window wider.

Scene Inventory version history

Rendered offscreen with a fake controller and sample data.

Additional info

Part of a stack, this PR targets the Browser and Workfiles activity branch because it uses its ActivityWidget:

  1. UI: Activity feed styling and activity stream component #2145 UI: Activity feed styling and activity stream component, targets develop, includes the avatars of UI: Show user avatars in the activity stream #2146 which is merged into it
  2. [WIP] Browser, Workfiles: Activity tab in the side panels #2147 Browser, Workfiles: Activity tab in the side panels (WIP), targets UI: Activity feed styling and activity stream component #2145
  3. [WIP] Scene Inventory: Version history panel #2148 Scene Inventory: Version history panel (WIP), targets [WIP] Browser, Workfiles: Activity tab in the side panels #2147 (this PR)
  • Versions are fetched in the background and only while the panel is visible.
  • The version list goes through the controller (get_version_history_contexts, get_version_history_items, get_version_thumbnail_path), backed by a new VersionHistoryModel.

Pending to-do

Backend / frontend separation:

  • The activity of the selected version is requested through the controller (get_activity_items, get_user_items), like in the PR below in the stack.
  • Avatars of the author column are requested through the controller (get_user_avatar_path), from the avatars cache shared by all tools.
  • Thumbnails come from the shared ThumbnailsModel and its cache on local storage, the model has no download of its own anymore. Names of users come from the UsersModel of the controller.
  • get_version_thumbnail_path and get_user_avatar_path return a local file path, which assumes backend and frontend share a filesystem.

Functionality:

  • Needs testing in a host against a real scene.
  • No actions on the versions in the list yet, e.g. switch the container to the selected version.

Testing notes:

  1. Load a few products in a host and open the Scene Inventory.
  2. Click the history button in the header, the panel shows below the view.
  3. Select a container: its product versions are listed, with the loaded and latest version marked.
  4. Select a version in the list, its activity shows next to it.
  5. Select containers of multiple products and check the panel.
  6. Run ./tools/manage.sh run pytest tests/client/ayon_core/tools/sceneinventory -v

@BigRoy BigRoy added type: enhancement Improvement of existing functionality or minor addition ui labels Oct 5, 2026
@BigRoy BigRoy self-assigned this Oct 5, 2026
@BigRoy
BigRoy requested a review from iLLiCiTiT October 5, 2026 10:09
@ynbot ynbot added the size/XL label Oct 5, 2026
@BigRoy
BigRoy requested a review from LiborBatek October 5, 2026 10:23
@BigRoy
BigRoy force-pushed the enhancement/scene-inventory-version-history branch from 4885f28 to 53e9573 Compare October 5, 2026 10:27
@BigRoy
BigRoy force-pushed the enhancement/browser-workfiles-activity-tab branch from c9c494b to 586808e Compare October 5, 2026 10:27
@BigRoy
BigRoy force-pushed the enhancement/scene-inventory-version-history branch from 53e9573 to f459207 Compare October 5, 2026 10:55
@BigRoy
BigRoy force-pushed the enhancement/browser-workfiles-activity-tab branch from 586808e to 60ff137 Compare October 5, 2026 10:55
@BigRoy
BigRoy force-pushed the enhancement/scene-inventory-version-history branch 2 times, most recently from b73b0f1 to 3dbfa1b Compare October 5, 2026 14:04
@BigRoy
BigRoy force-pushed the enhancement/browser-workfiles-activity-tab branch from 175dc9f to 265a91b Compare October 5, 2026 14:04
@iLLiCiTiT

Copy link
Copy Markdown
Member

Not sure if related to this PR:

  1. User without avatar has offset text
image
  1. The feature is somewhat hidden. The icon looks like "refresh". Maybe "calendar_clock" would be better?
image
  1. The color of icon stays as blue after click (changes back only by changing focus).

@BigRoy

BigRoy commented Oct 7, 2026 •

Copy link
Copy Markdown
Member Author

Thanks @iLLiCiTiT!

  1. Offset initials for a user without an avatar - not related to this PR, the Browser's author column on develop has it too. Split out to UI: Draw initials locally for users without an avatar #2174, with before/after images. For a user without an uploaded avatar the avatar endpoint responds with a generated SVG of the initials (create_initials_svg in ayon-backend), centered with dominant-baseline, which Qt does not support so the text is drawn off center. That response is now skipped and the initials are drawn locally. Checked against the source of the endpoint, not against a running server.
  2. Icon looks like "refresh" - changed to calendar_clock in f2c25c8.
  3. Icon stays blue after click - fixed in the same commit. It used the "on" color of the icon states, which also applies to a hovered or focused button that is unchecked. The icon is now swapped on toggle instead.

@BigRoy
BigRoy force-pushed the enhancement/browser-workfiles-activity-tab branch from 265a91b to d5ca2fd Compare October 7, 2026 16:13
@BigRoy
BigRoy force-pushed the enhancement/scene-inventory-version-history branch 2 times, most recently from 32e995f to 361bbd9 Compare October 7, 2026 18:45
@BigRoy
BigRoy force-pushed the enhancement/browser-workfiles-activity-tab branch from 10741fa to 9a0ea6a Compare October 7, 2026 18:46
BigRoy added 5 commits October 7, 2026 20:46
A toggle button shows the version history of the product of the
selected container below the view: versions from the newest to the
oldest with the loaded and latest one marked, their status, author,
date and publish comment, next to the activity of the selected
version. The panel is hidden by default and shares the height of the
window, so it never makes the window wider.
The history icon looked like the refresh button next to it. The
highlighted icon of the checked button is now set on toggle instead of
through icon states, which kept the button highlighted after it was
unchecked for as long as it was hovered or focused.
The activity widget takes the controller instead of a model. The
controller provides the activity and user items, backed by the
activities and users models.
Version thumbnails come from the thumbnails model instead of a
download of its own, avatars from the avatars cache, and the names of
users from the users model of the controller, so they are queried
once for the version list and the activity feed.
@BigRoy
BigRoy force-pushed the enhancement/scene-inventory-version-history branch from 361bbd9 to 1818169 Compare October 7, 2026 18:46
@BigRoy BigRoy linked an issue Oct 13, 2026 that may be closed by this pull request

This branch has not been deployed

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

Labels

size/XL type: enhancement Improvement of existing functionality or minor addition ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YN-1053: Web UI comments in Ayon Loader/Workfiles

3 participants