cylc-ui icon indicating copy to clipboard operation
cylc-ui copied to clipboard

Display filenames in Lumino tabs for log views

Open MetRonnie opened this issue 4 months ago • 1 comments

Follow-up to #2290 / #2023

Couple of options for improving the tab titles (not mutually exclusive)

we could use a symbol for the view type (saves a few chars)

use text-editor style path shortening to reduce tab title lengths as needed.

For the latter we already do something like this inside the log view for the full path (not sure how applicable it is for this):

https://github.com/cylc/cylc-ui/blob/1867bfdc89f962ce0852f696604a60cccf71f520/src/views/Log.vue#L161-L168

MetRonnie avatar Oct 14 '25 13:10 MetRonnie

More context from #2023

The biggest problem here is somehow summarizing the cycle point, task name and job submission number into something concise enough to fit into the tab title without making the UI clunky.

Text editors have been dealing with this sort of problem for a while now, e.g, take a look at the different configuration options in this Vim plugin: https://github.com/vim-airline/vim-airline?tab=readme-ov-file#default

We could potentially pick one of those methods, however, the text would still end up lengthy.

E.g, job IDs could be shortened like so:

20000101T0000Z/long_task_name_foo_bar_baz/01  ->  2000../l/01
20010101T0000Z/long_task_name_foo_bar_baz/02  ->  2001../l/02

But we would need a global inventory of all open log tabs to be able to shorten these appreciably.

Perhaps the easiest way forward is just to include the filename in the tab name (e.g. job.out or 01-scheduler-01.log) but not the file path? Still confusing if you have multiple jobs open though.

MetRonnie avatar Oct 14 '25 13:10 MetRonnie