We can no longer rely on landscape to be installed and serving a
channel.js, so we bring our own.
App discovery works through gall now. We can only ask per desk though,
so we still need to talk to clay for the set of desks.
When you loaded an app with an error, then fixed the error, it would
create the main gall %mult subscription at a time in the past. Then,
clay would never fill the subscription since it couldn't get the old %a
entries for the apps.
This fixes the issue in two ways: first, don't subscribe in the past.
Second, if clay can't get the old versions, just fire the subscription
anyway.
Remote install send a %commit because they receive new files. Local
installs never receive files, so weren't notifying kiln subscribers.
Here we "manually" send a %commit fact when installing a local desk.
The base desk is the new default. If we leave the dir untouched, for
most users this means they remain on home, which gets rendered
explicitly in the prompt since it's no longer the default desk.
Previously, if trying to bind to an endpoint that was already bound to,
eyre would reject it. This doesn't play very nicely in a softdist world
where uninstalled apps might not get a chance to clean up, and apps
might re-bind simply for being re-installed.
Here we change eyre to overwrite an existing binding if it conflicts
with the new one to be added.
Syntax is +desk#gen. (We can probably find something nicer.)
:app|gen desugars to :app +desk#gen, where the desk is the desk the app
is running on.
:app|desk#gen currently broken, in the sense that the above desugaring
takes precedence.
+on-load just aborts any running user action to avoid having a
monstrously large state adapter.
Notably, we include the base desk last. This is to ensure that the
other desks are present by the time kiln gets loaded from base, letting
it install the software on the other desks, as per 22ad2516c.
During kiln's +on-init, we now check for non-base (and non-kids) desks.
If any are present, we execute the install flow for them, and set them
to sync from our sponsor afterwards.
This depends on work done in d7afe3229, in that without those changes
the successive +find requests from kiln to clay would clobber each
other, leaving only the "install from sponsor" one active, thus never
actually installing the desk for which we already have the files.
When installing from an existing local desk, kiln now scries the
relevant data out of clay instead of sending moves to it and awaiting
responses.
This prepares for coming kiln work.
If a remote commit is downloaded that simultaneously removes an agent from
desk.bill but also removes the associated source files, then the commit
will fail as gall will not have received the card to kill the agent yet.
Instead, we read our foreign copy of the bill in +take-download, and
kill any necessary agents there, preventing a reload of the deleted
agent from occurring.
When we receive the %mere gift from clay, the kernel has not yet been
reloaded. This means any attempts to bump desks will fail, as they will
be bumped against the old kernel. Rectifies this by continuing the %base
desk update flow in +on-load, instead of +take-merge-main. Also adds a
wef=(unit weft) to the state in order to discriminate whether or not the
kernel has just been reloaded