#cloud urls in the tui
1 messages ยท Page 1 of 1 (latest)
current we have no cloud url in this case
here's my idea, for plain progress, we can insert it cleverly into the middle of the progress:
but for tui progress, that node should collapse
so here's an alternative idea for that one:
we could have something display in the "logs panel" at the very top, that's not part of the tree
the other question is - should this always be displayed? or should it only display on higher verbosities?
personally i'm leaning towards always show it if possible, it makes scrolling backwards through past runs much easier, and it really only adds one line
cc @stuck halo @reef ferry @open epoch
for context, i'm starting on addressing https://github.com/dagger/dagger/pull/7385#issuecomment-2138368581, and going to pull it into https://github.com/dagger/dagger/pull/7474
another idea i had is we could do the same thing as for the plain progress, and insert it into the tree, but never collapse it (and it's connect parents) during the run
i've been planning some TUI changes/enhancements for this week but have plenty of other things to do if you're interested in tackling them ๐ - this was on the list
The List:
- support more keybinds, and show them so they're discoverable, i.e. dimmed line showing the primary ones, with
?to show more - show the cloud URL in a dedicated line at top or bottom, and/or have a keybind to open in cloud (
o?c?), since the URL is quite large - press
+to increase verbosity,-to decrease verbosity - navigate with arrow keys and/or hjkl, so you can browse things off-screen
- render only the visible region, to improve performance for large traces (right now it renders everything and lets it get cut off, things get really sluggish with max verbosity)
- this one's tricky, I had a WIP implementation
- support clicking (or maybe hotkey?) to navigate to call receiver and/or args
- global logs pane shouldn't get pushed off-screen
ahhh so some of these sound very bubble-teay to me ๐ i might try, but no promises ๐
i like discoverable keybinds
but i still think we should "print" the cloud url somehow - even if we use an OSC8 hyperlink
yeah this approach lgtm - as long as it doesn't get pushed offscreen
the main factor nudging me towards maybe just having a keybind is screen real estate, like if we also add a row for the keybinds list
people like how quiet the new TUI is, so trying not to undo that
mmm i think tricky to balance - but also i would really value being able to use terminal scrollback to see old cloud urls
argh i guess this is the kinda thing we'd want a/b testing for ๐
we talked about having a dagger history or something for that, not sure if 'in addition' or 'instead of'
i can see the value of having it in the scrollback though, since it keeps context
once you get the hang of it, bubbletea is pretty easy ๐ the init/update/view model is super versatile
happy to help if you're interested
i think i might try osc8 as a way to hide the full link - we could show a shortened trace name for that
something similar to a short git hash
yeah worth a shot
cool cool, so i shall try putting it there in it's own special little panel, just above the tree, and try and get that working ๐

while you're in the area, would be nice to keep the logs from being pushed offscreen too
right now anything up top gets cut off because we just let bubbletea cut off the View() result
yeah ๐
another one on my list is that i want midterm rendering to not render empty spaces at the end of lines
omg yes please
since it creates some very odd issues when resizing the terminal sometimes
i've been close to fixing that several times
but each time the fix wasn't the 'simple thing' and i got distracted ๐
terminal output hard
it's really annoying when copy-pasting too
yeah, it's kinda this "newlines" interrupting the flow problem
i guess ideally, midterm should have some way of knowing that a line break happened, but when we render a line, we render it without a custom entered newline
so we don't break that flow/break the resizing
the tricky thing is from midterm's POV it just has a giant grid of cells with formatting / content applied to them, as a result of various esc sequences
that whitespace could have a background color, for example, which it should render if present
otherwise you might get things like htop looking funny
nope, it just moves the cursor
bleh
that's why it's tricky haha
okay so the space issue is "simple" - just trim all non-formatted whitespace from the end of a line
the \n insertion is trickier
so the first thing I tried was something like, for each line, loop from the end, and as long as Content==' ' and Format=Format{}, increment a number, and stop once we hit a non-empty cell
but it didn't work, possibly for a dumb reason, not sure
i wish you luck
๐
oh while on the topic: https://github.com/dagger/dagger/issues/7510#issuecomment-214772778
were you gonna pick this up? i probably also can
I can pick that one up, it's deeper in the plumbing, and I'm in that area already
my 2c is:
fixed to bottom in plain progress
keybind in TUI and if it's hard to implement, fixed as well
agree with saving space, but cloud URL feels important in that sense
there's not a whole lot we can do with plain progress unfortunately
plain progress can't fix anything
oh
yeah, it's all a one-shot printing stream basically
every line that's written has to be treated as "final"
then print at beginning + end?
yes, this makes things very painful
printing again at the end could make sense 
yeah this seems alright ๐
is there an echo in here?
hehe ๐
I would add a newline before and after the URL as well, to make it stand out a bit more
or just adding a visual cue
but not sure which one
I guess icons are not that portable on a terminal, we would want to be as slim as possible in terms of chars
i think for the first one having it appear inline is the best option - splitting it out is hard
because now you need to interpolate logs and spans in a way that makes some amount of sense
which it's technically doing on main now
hmm makes sense
feels related to the concept of 'global logs' which progrock used to implement but we haven't really brought back properly
i had a half baked attempt at keeping it, where you could log while still in a span (so you can keep context), but mark it in a way that it would also bubble up globally to the user, but it was never respected anywhere
and i just reimplemented how that works in my otel refactor PR (but still nothing respects it)
the other place we want to use it is checkVersionCompatibility
heh
i want to get rid of that
i did hear rumblings of that
but this one is such a pain to test, i haven't had time to revisit it
alright, i pulled this into https://github.com/dagger/dagger/pull/7474
Follow up to #7272, specifically going to aim to correct some of @vito's comments in #7272 (review) and @aluzzardi's comments in #7385 (comment).
Improvements:
Don't skip displaying fa...
essentially, the main way of displaying this is a big message at the bottom of the output
but for plain progress we display this little fake log message inline with connect
i'm gonna keep this as out-of-scope for right now (sorry) - i wanna get these progress improvements in and spend a moment looking at something else for a bit ๐ sorry, my head is too full of terminals ๐
i may circle back round ๐
All good! Just getting TODOs out of my head in case anyone else has bandwidth ๐ - maybe I should put things in Linear or GitHub
bleh https://github.com/dagger/dagger/pull/7452 reviewing this is hard ๐ guess that's my todo today