Commit Graph

24428 Commits

Author SHA1 Message Date
fang
a13f19d6f9
webterm: send %blew on resize
Also tweaks the layout a little bit to maintain consistency throughout
resizing.
2021-04-27 22:52:38 +02:00
fang
9c0bae654b
webterm: include herm tasks in term api 2021-04-26 17:20:42 +02:00
fang
9d6db9baaf
term: fix ci output somehow
During CI (specifically, urbit-tests), slogs and printf output would
get interleaved, sometimes intermingling, mangling the resulting
output.

Best guess is this happens because of something weird we're doing with
regards to pushing output. Additional scatter-shot fflush calls solve
this. The fix herein also solves this. Unclear why, considering this
commit should result in identical behavior for the -t case.

Here be dragons.
2021-04-24 01:24:09 +02:00
~locpyl-tidnyd
0ddde0b0d6
vere: export term.c:_write() as u3_write_fd(), use in dprintf() replacement 2021-04-21 01:08:19 +02:00
~locpyl-tidnyd
f06471cb31
vere: pipe serf stderr back to lord
When uv_spawn creates a process and any standard fds are set to UV_INHERIT_FD,
it ignores UV_PROCESS_WINDOWS_HIDE flags, and worker console pops up in -d mode.
2021-04-21 00:50:49 +02:00
fang
ba3a62f958
zuse: fix off-by-one in +wail:klr:format 2021-04-21 00:50:11 +02:00
fang
d1fba5d740
kh: correctly (re)store styled lines
We weren't accounting for the cursor column when storing output, nor
accounting for styled contents properly.

See also a8de23ca9 for the equivalent change in Vere.
2021-04-21 00:43:12 +02:00
fang
a8de23ca92
term: correctly (re)store styled lines
We were storing the contents of the bottom line, but not accounting for
style/escape characters when overwriting parts of it with new contents.

Here, we switch to storing a +stub noun in state instead, letting us
rely on the stdlib for the overwriting logic.
This comes at the cost of having to re-render the stub into an escape
sequence on every restore, but that has yet to prove itself slow enough
to care about.
2021-04-17 02:38:56 +02:00
fang
2c837da6fa
zuse: add additional stub utilities in +klr
+wail, for overwriting part of a stub, starting at the given index,
extending it using the specified character if the index is past the end
of the stub.

+pact, for merging sequential stub sections with identical style.
2021-04-17 01:42:00 +02:00
fang
95c3a51ba1
zuse: make +slag:klr:format match +slag's behavior
Previously, if the given index was beyond the stub's content, it would
return the entire stub. Now, it correctly returns the empty stub.
2021-04-17 01:31:40 +02:00
fang
8716c49b45
kh: always draw spinner on bottom line
Now always draws the spinner on the bottom line, regardless of the
cursor position.
2021-04-16 15:11:33 +02:00
fang
fab0f65d58
term: bump on-return spinner delay from 0 to 100ms
Not drawing the spinner when the command gets processed nearly instantly
makes things feel slightly better.
2021-04-15 20:54:55 +02:00
fang
56f1ef3a4c
term: simpler blit rendering during -t
Separates blit rendering for logic for -t into a separate function.
Ensures we don't overwrite any rendered content and always put newlines
in between distinct pieces of output.

Also stops storing the bottom line of output in the -t case, since it
won't get re-rendered anyway.

Hopefully this makes CI output look nice again.
2021-04-15 16:35:49 +02:00
fang
cf93320cf0
term: clean up escape sequence constants
Use them for all zero-argument sequences, remove unused ones, and make
their naming consistent.

Also removes old, commented code around input sequences.
2021-04-15 01:50:45 +02:00
fang
32a5e9085c
term: exclusive save cursor after explicit move
In other words, don't issue the ANSI escape sequence for saving the
cursor position at the start of a printf hijack sequence. Instead
trust this was already done when the cursor position was last changes
by a blit.
2021-04-15 01:18:43 +02:00
fang
e93d50b3ee
term: remove legacy conditional 2021-04-14 20:53:22 +02:00
fang
cbd6a919cb
term: remove unused %hook code 2021-04-14 20:50:42 +02:00
fang
a09bb86cc6
dill: resolve review questions 2021-04-14 20:35:47 +02:00
fang
c55ebf36a4
kh: don't show spinner name for user inputs 2021-04-14 20:35:17 +02:00
fang
98d48913bf
kh: improve term code style
Based on feedback during review.
2021-04-14 17:10:50 +02:00
fang
65602198fc
aqua: use most-recent blit type 2021-04-05 22:55:12 +02:00
fang
1c6d5ea341
dill: remove viewers when deleting a session
We do not allow subscribing to non-existent sessions, so we should not
allow staying subscribed to deleted sessions.
2021-04-05 22:49:28 +02:00
fang
51492917d7
herm: support non-default dill sessions
Notably keeps session "subscriptions" open until the session is deleted.
Perhaps we should optimize that at some point?
2021-04-05 22:49:05 +02:00
fang
33865ca87a
dill: add scry endpoints for session discovery 2021-04-05 22:42:07 +02:00
fang
d93e9c6dd4
dill: store width for session when it changes 2021-04-05 22:41:46 +02:00
fang
91f32ee098
dill: reify sessions interface
Implements tasks for creating and deleting new sessions, and allows
terminal handler agents to distinguish between sessions.

Includes bits of preparation in drum to more fully support multiple
distinct sessions, but doesn't get it all the way there just yet.
2021-04-05 22:37:38 +02:00
fang
5ef68d38c7
gall: stop sending %onto
Gall would send %onto gifts to notify about app updates and update
failures. This would end up in dill, which printed some appropriate
text.

Here, we make gall responsible for doing this printing itself (by
having it explicitly ask dill to print some tape/tank), instead of
relying on the receiving end of some bespoke notification protocol.
2021-04-04 17:22:41 +02:00
fang
c4f470ec15
dill: properly support %talk, tanks printing
Also allowing for sequences of tanks. (Not to be confused with +tang,
which has stack trace/reverse-order semantics.)
2021-04-04 17:15:36 +02:00
fang
0a75ca19f3
kh: support mouse reporting for %hit belts
This comes with the caveat that this specific mouse reporting mode
(which should only report clicks of the primary button) doesn't
actually seem to be supported by most terminal emulators, even though
it precedes the more complex reporting modes.

(Enabling a more complex reporting mode instead would also capture
scroll events, which interferes with expected behavior while in tmux.)
2021-04-02 14:25:29 +02:00
fang
01b8995e33
kh: decouple trace & slog writing from drum prompt
New blit logic already stopped assuming the bottom line based on %nel
blits, instead looking at cursor position to determine if something
was getting drawn to the bottom of the screen or not.

Here, we stop overwriting the bottom line entirely (except for the
spinner), instead inserting the trace/slog directly above the bottom
line on-screen, without overwriting anything.

Side-effect of this is that trailing newlines are always there, so we
can stop including them explicitly.
2021-04-02 14:21:22 +02:00
fang
a90489830d
kh: update Term for new dill interface
Support new Belts/Blits and updated semantics.
2021-04-02 13:58:13 +02:00
fang
1abbe168fe
kh: expose to/fromNoun template logic separately
Separately from deriveNoun, which gives you an entire instance. Having
access to these lets you call out to the auto-generated conversion
logic when writing custom code for it.
2021-04-02 13:21:20 +02:00
fang
7e2cc77ae0
clay: explicitly ask dill to print changelist
Instead of emitting a "debug message" gift and hoping dill picks it up
for printing.
2021-03-31 22:28:22 +02:00
fang
49a991e40e
term: final +belt tweaks
The previous version allowed for redundant values (both [%bac ~] and
[%key ~ %bac ~] for example), had an odd constraint in @cF, and relied
unnecessarily on $<.

Also rewords some of the belt and blit descriptions.
2021-03-19 23:56:51 +01:00
fang
1d43942bf2
various: fix compilation failures
Due to recent dill changes.
2021-03-15 21:19:28 +01:00
fang
7fe8c67684
drum: restrict +se-blin to expected/sane blits
We only expect the two primary screen-draw blits here.
2021-03-13 02:34:45 +01:00
fang
8f92265680
term: correctly deduce stub memory requirements
We were only counting one instead of two colors (fg/bg), and not
allowing for combined decorators.
2021-03-13 02:20:11 +01:00
fang
23ec162c2f
term: rewrite _term_it_send_csi
Instead of asynchronously printing the sequence as we render it,
construct it once and then write it out synchronously.
2021-03-13 02:20:10 +01:00
fang
d355d3b71c
webterm: improve style & dark mode reactivity
Now reacts to changes in light/dark more, uses Landscape font set,
covers up container gaps.
2021-03-13 02:20:08 +01:00
fang
81e7808247
webterm: improve state management/lifecycle
Results in slightly better behavior... but it still breaks on dev
auto-refresh?

Also no longer does the ''<->'default' transform for the default session
identification in state, instead always using the empty string.
2021-03-13 02:20:07 +01:00
fang
4b7f05c681
dill: rename %lin to %put
It's no longer strictly a full line of screen content, instead more
accurately described now as "put text at cursor".
2021-03-13 02:20:00 +01:00
fang
2861de983b
dill: replace %ctl and %met belts with %key
Previously, we relied on foolish hacks, like [%met %bac], to send
"special" keystrokes with modifiers.

This updates the belt type to have %key, which represents a single
keystroke, with any combination of modifier keys.

Note that this has overlap with %txt to some extent. [%key ~ 'a'] should
be considered equivalent and preferred to [%txt 'a' ~], but updating
existing usage is left to a later commit.
2021-03-13 02:19:36 +01:00
fang
544126f3ee
Merge remote-tracking branch 'origin/release/next-js' into m/next-gen-term 2021-03-10 11:49:08 +01:00
Liam Fitzgerald
d82e886e2a
UnjoinedResource: fix crash 2021-03-10 17:19:08 +10:00
matildepark
9c5b82237e
Merge pull request #4575 from urbit/lf/hark-refresh
Notifications: fix refresh
2021-03-10 01:35:45 -05:00
Liam Fitzgerald
e44f78ad1b
Profile: fix broken status 2021-03-10 16:15:34 +10:00
Liam Fitzgerald
c0eddeda4b
notifications: fix refresh bug
Fixes urbit/landscape#546
2021-03-10 16:11:13 +10:00
Liam Fitzgerald
ca682f7bcf
RemoteContent: fix store access 2021-03-10 15:56:22 +10:00
Liam Fitzgerald
77857a487e
Merge pull request #4510 from tylershuster/zustand-stores
interface: convert stores to zustand
2021-03-10 15:40:29 +10:00
janeway-bot
b5c0176fec
Merge d17779972f into release/next-js 2021-03-10 06:15:20 +04:00