Skip to content

Add file size column to workfiles in launcher #1898

Open
mahesh-ynput wants to merge 18 commits into
ui-qt-luncherfrom
1896-yn-0651-display-file-timestamp-and-size-in-the-launcher
Open

Add file size column to workfiles in launcher #1898
mahesh-ynput wants to merge 18 commits into
ui-qt-luncherfrom
1896-yn-0651-display-file-timestamp-and-size-in-the-launcher

Conversation

@mahesh-ynput

Copy link
Copy Markdown
Collaborator

Changelog Description

The Launcher currently shows no file metadata such as timestamp or file size. Could you please add file size and last modified timestamp allowing artists to quickly spot zero-size or potentially corrupt files before wasting time attempting to open them?

Additional info

last modified column is already there now implemented other column where includes workfile size

Testing notes:

  1. Open launcher select project->folder->task
  2. See workfiles size section 3rd column

@mahesh-ynput

Copy link
Copy Markdown
Collaborator Author

Resizing column is in pending.

Comment thread client/ayon_core/tools/launcher/ui/workfiles_page.py Outdated
Comment thread client/ayon_core/tools/launcher/ui/workfiles_page.py Outdated
@ynbot ynbot moved this to Review In Progress in PR reviewing Jun 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds workfile file-size metadata to the Launcher “Workfiles” listing so artists can spot empty/corrupt files before opening them.

Changes:

  • Extend WorkfileItem with an optional file_size field.
  • Populate file_size in the launcher backend model when the workfile exists on disk.
  • Add a new “Size” column in the workfiles UI model and display formatted sizes.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
client/ayon_core/tools/launcher/ui/workfiles_page.py Adds a 3rd column (“Size”), stores FILE_SIZE_ROLE, formats size for display, and exposes it through the model.
client/ayon_core/tools/launcher/models/workfiles.py Computes file size from disk for existing workfiles and passes it into WorkfileItem.
client/ayon_core/tools/launcher/abstract.py Extends WorkfileItem dataclass with optional file_size.
Comments suppressed due to low confidence (1)

client/ayon_core/tools/launcher/ui/workfiles_page.py:266

  • Size values are formatted to strings for DisplayRole, so sorting the "Size" column will be lexicographic (e.g. "900.0 KB" > "1.0 MB"). Add a numeric comparison for column 2 using FILE_SIZE_ROLE in the proxy's lessThan so sort works as expected.
class WorkfileSortFilterProxy(QtCore.QSortFilterProxyModel):
    def lessThan(self, source_left, source_right):
        l_host = source_left.data(HOST_NAME_ROLE)
        r_host = source_right.data(HOST_NAME_ROLE)
        if l_host != r_host:

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread client/ayon_core/tools/launcher/models/workfiles.py
Comment thread client/ayon_core/tools/launcher/ui/workfiles_page.py Outdated
Comment thread client/ayon_core/tools/launcher/ui/workfiles_page.py

@BigRoy BigRoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we also make sure that by default there's no horizontal scrollbar - so we'll need to pick some decent default widths? Or trigger resize to fit contents for the columns whenever we switch - but not sure that's entirely nice 🤔

@BigRoy BigRoy added the type: enhancement Improvement of existing functionality or minor addition label Jun 17, 2026
…egate and now model returns raw size for size column this helps for sorting too
@mahesh-ynput

Copy link
Copy Markdown
Collaborator Author

Can we also make sure that by default there's no horizontal scrollbar - so we'll need to pick some decent default widths? Or trigger resize to fit contents for the columns whenever we switch - but not sure that's entirely nice 🤔

22a8e4f

@BigRoy BigRoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@github-project-automation github-project-automation Bot moved this from Review In Progress to Merge Requested in PR reviewing Jun 17, 2026
@BigRoy BigRoy added the ui label Jun 18, 2026
@BigRoy BigRoy requested review from iLLiCiTiT and moonyuet June 18, 2026 09:33
Comment thread client/ayon_core/tools/utils/delegates.py Outdated
@ynbot ynbot moved this from Merge Requested to Review In Progress in PR reviewing Jun 18, 2026
Comment thread client/ayon_core/tools/launcher/ui/workfiles_page.py Outdated
Comment thread client/ayon_core/tools/launcher/ui/workfiles_page.py Outdated
Comment thread client/ayon_core/tools/launcher/ui/workfiles_page.py Outdated
Comment thread client/ayon_core/tools/launcher/ui/workfiles_page.py Outdated
Comment thread client/ayon_core/tools/launcher/ui/workfiles_page.py Outdated
Comment thread client/ayon_core/tools/launcher/models/workfiles.py
Comment thread client/ayon_core/tools/launcher/models/workfiles.py Outdated

@moonyuet moonyuet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does testing with the launcher, working as expected. Please take a look at review and do the code changes so that we can possibly merge this PR. Thanks

mahesh-ynput and others added 7 commits June 18, 2026 21:27
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Comment thread client/ayon_core/tools/utils/delegates.py
…o that can also used in files_widget_published.py

- Removed duplication of file_size_to_string from side_panel.py and used one from delegates
- applied jakub suggestion in workfiles_page.py
- changed font size to 10.5 in launcher_style.css

@moonyuet moonyuet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See the suggestion below.

Comment thread client/ayon_core/tools/launcher/ui/workfiles_page.py Outdated
BigRoy and others added 2 commits June 19, 2026 16:45
Co-authored-by: Kayla Man <64118225+moonyuet@users.noreply.github.com>
Comment thread client/ayon_core/tools/launcher/ui/workfiles_page.py
Comment thread client/ayon_core/tools/launcher/ui/workfiles_page.py Outdated
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
@moonyuet

moonyuet commented Jul 7, 2026

Copy link
Copy Markdown
Member

I did the test on the launcher with the updated commit. looks good.
Are we gonna merge this or we need to resolve something else?
image

@BigRoy

BigRoy commented Jul 7, 2026

Copy link
Copy Markdown
Member

I think we can merge it. Unless we want to keep ui-qt-luncher branch lean for the time being.

Will leave up to @iLLiCiTiT

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

Labels

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

Projects

Status: Review In Progress

Development

Successfully merging this pull request may close these issues.

YN-0651: Display file timestamp and size in the Launcher

7 participants