From d4d655528e84e8e60c1417152808c0a54ca47d76 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Wed, 11 Nov 2020 15:42:40 +1000 Subject: [PATCH 01/38] channel.js: queue interactions --- pkg/arvo/app/landscape/js/channel.js | 66 ++++++++++++++----- pkg/interface/src/logic/api/base.ts | 6 +- pkg/interface/src/logic/subscription/base.ts | 8 ++- .../src/logic/subscription/global.ts | 31 +++++---- 4 files changed, 80 insertions(+), 31 deletions(-) diff --git a/pkg/arvo/app/landscape/js/channel.js b/pkg/arvo/app/landscape/js/channel.js index e4e0b14553..89974ef589 100644 --- a/pkg/arvo/app/landscape/js/channel.js +++ b/pkg/arvo/app/landscape/js/channel.js @@ -55,6 +55,10 @@ class Channel { // disconnect function may be called exactly once. // this.outstandingSubscriptions = new Map(); + + this.outstandingJSON = []; + + this.ackTimer = setInterval(this.ack.bind(this), 5000); } setOnChannelError(onError = (err) => {}) { @@ -71,9 +75,16 @@ class Channel { }); } + ack() { + if(this.lastAcknowledgedEventId === this.lastEventId) { + return; + } + this.sendJSONToChannel(); + } + // sends a poke to an app on an urbit ship // - poke(ship, app, mark, json, successFunc, failureFunc) { + poke(ship, app, mark, json, successFunc, failureFunc, queue = false) { let id = this.nextId(); this.outstandingPokes.set( id, @@ -83,14 +94,21 @@ class Channel { } ); - this.sendJSONToChannel({ - id, - action: "poke", - ship, - app, - mark, - json - }); + const j = { + id, + action: "poke", + ship, + app, + mark, + json + }; + + if(queue) { + this.outstandingJSON.push(j); + return; + } + + this.sendJSONToChannel(j); } // subscribes to a path on an specific app and ship. @@ -104,7 +122,9 @@ class Channel { connectionErrFunc = () => {}, eventFunc = () => {}, quitFunc = () => {}, - subAckFunc = () => {}) { + subAckFunc = () => {}, + queue = false + ) { let id = this.nextId(); this.outstandingSubscriptions.set( id, @@ -116,13 +136,20 @@ class Channel { } ); - this.sendJSONToChannel({ + const json = { id, action: "subscribe", ship, app, path - }); + } + + if(queue) { + this.outstandingJSON.push(json); + return id; + } + + this.sendJSONToChannel(json); return id; } @@ -131,6 +158,7 @@ class Channel { // delete() { let id = this.nextId(); + clearInterval(this.ackTimer); navigator.sendBeacon(this.channelURL(), JSON.stringify([{ id, action: "delete" @@ -159,21 +187,29 @@ class Channel { req.setRequestHeader("Content-Type", "application/json"); if (this.lastEventId == this.lastAcknowledgedEventId) { - let x = JSON.stringify([j]); + if(j) { + this.outstandingJSON.push(j); + } + let x = JSON.stringify(this.outstandingJSON); req.send(x); + this.outstandingJSON = []; } else { // we add an acknowledgment to clear the server side queue // // The server side puts messages it sends us in a queue until we // acknowledge that we received it. // - let payload = [{action: "ack", "event-id": parseInt(this.lastEventId)}]; + let payload = [ + ...this.outstandingJSON, + {action: "ack", "event-id": parseInt(this.lastEventId)} + ]; if(j) { payload.push(j) } let x = JSON.stringify(payload); req.send(x); + this.outstandingJSON = []; this.lastEventId = this.lastAcknowledgedEventId; } @@ -217,8 +253,6 @@ class Channel { funcs["subAck"](obj); } } else if (obj.response == "diff") { - // ack subscription - this.sendJSONToChannel(); let funcs = subFuncs; funcs["event"](obj.json); } else if (obj.response == "quit") { diff --git a/pkg/interface/src/logic/api/base.ts b/pkg/interface/src/logic/api/base.ts index da17a9ad13..323c13ce77 100644 --- a/pkg/interface/src/logic/api/base.ts +++ b/pkg/interface/src/logic/api/base.ts @@ -11,7 +11,7 @@ export default class BaseApi { this.channel.unsubscribe(id); } - subscribe(path: Path, method, ship = this.ship, app: string, success, fail, quit) { + subscribe(path: Path, method, ship = this.ship, app: string, success, fail, quit, queue = false) { this.bindPaths = _.uniq([...this.bindPaths, path]); return this.channel.subscribe( @@ -32,7 +32,9 @@ export default class BaseApi { }, (qui) => { quit(qui); - } + }, + () => {}, + queue ); } diff --git a/pkg/interface/src/logic/subscription/base.ts b/pkg/interface/src/logic/subscription/base.ts index 481c014b08..15d76e787c 100644 --- a/pkg/interface/src/logic/subscription/base.ts +++ b/pkg/interface/src/logic/subscription/base.ts @@ -9,6 +9,10 @@ export default class BaseSubscription { this.channel.setOnChannelOpen(this.onChannelOpen.bind(this)); } + dequeue() { + this.channel.sendJSONToChannel(); + } + delete() { this.channel.delete(); } @@ -38,7 +42,7 @@ export default class BaseSubscription { }, Math.pow(2,this.errorCount - 1) * 750); } - subscribe(path: Path, app: string) { + subscribe(path: Path, app: string, queue = false) { return this.api.subscribe(path, 'PUT', this.api.ship, app, this.handleEvent.bind(this), (err) => { @@ -47,7 +51,7 @@ export default class BaseSubscription { }, () => { this.subscribe(path, app); - }); + }, queue); } unsubscribe(id: number) { diff --git a/pkg/interface/src/logic/subscription/global.ts b/pkg/interface/src/logic/subscription/global.ts index 4e6d6e1e94..7972c1068d 100644 --- a/pkg/interface/src/logic/subscription/global.ts +++ b/pkg/interface/src/logic/subscription/global.ts @@ -43,18 +43,27 @@ export default class GlobalSubscription extends BaseSubscription { }; start() { - this.subscribe('/all', 'invite-store'); - this.subscribe('/groups', 'group-store'); - this.subscribe('/primary', 'contact-view'); this.subscribe('/all', 'metadata-store'); - this.subscribe('/all', 's3-store'); - this.subscribe('/all', 'launch'); - this.subscribe('/all', 'weather'); - this.subscribe('/keys', 'graph-store'); - this.subscribe('/updates', 'hark-store'); - this.subscribe('/updates', 'hark-graph-hook'); - this.subscribe('/updates', 'hark-group-hook'); - this.subscribe('/updates', 'hark-chat-hook'); + this.subscribe('/all', 'invite-store', true); + this.subscribe('/all', 'launch', true); + this.subscribe('/all', 'weather', true); + this.dequeue(); + + + setTimeout(() => { + this.subscribe('/groups', 'group-store', true); + this.subscribe('/primary', 'contact-view', true); + this.subscribe('/all', 's3-store', true); + this.subscribe('/keys', 'graph-store', true); + this.subscribe('/updates', 'hark-store', true); + this.subscribe('/updates', 'hark-graph-hook', true); + this.subscribe('/updates', 'hark-group-hook', true); + this.subscribe('/updates', 'hark-chat-hook', true); + this.dequeue(); + + }, 1500) + + } restart() { From ff50838726138e5106a4d464952dca75cf947ae9 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Wed, 11 Nov 2020 15:48:09 +1000 Subject: [PATCH 02/38] interface: subscribe to rest of global state quicker --- pkg/interface/src/logic/subscription/global.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/interface/src/logic/subscription/global.ts b/pkg/interface/src/logic/subscription/global.ts index 7972c1068d..428106cf7d 100644 --- a/pkg/interface/src/logic/subscription/global.ts +++ b/pkg/interface/src/logic/subscription/global.ts @@ -61,7 +61,7 @@ export default class GlobalSubscription extends BaseSubscription { this.subscribe('/updates', 'hark-chat-hook', true); this.dequeue(); - }, 1500) + }, 200) } From 7addb558b2445547b459646aa48c2fddd3a99796 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Wed, 25 Nov 2020 16:37:23 +1000 Subject: [PATCH 03/38] channel.js: debounce subscribes --- pkg/arvo/app/landscape/js/channel.js | 51 +++++++++++-------- pkg/interface/src/logic/subscription/base.ts | 8 +-- .../src/logic/subscription/global.ts | 30 +++++------ 3 files changed, 47 insertions(+), 42 deletions(-) diff --git a/pkg/arvo/app/landscape/js/channel.js b/pkg/arvo/app/landscape/js/channel.js index 89974ef589..1c089ff80c 100644 --- a/pkg/arvo/app/landscape/js/channel.js +++ b/pkg/arvo/app/landscape/js/channel.js @@ -15,6 +15,7 @@ class Channel { } init() { + this.debounceInterval = 500; // unique identifier: current time and random number // this.uid = @@ -58,7 +59,19 @@ class Channel { this.outstandingJSON = []; - this.ackTimer = setInterval(this.ack.bind(this), 5000); + this.debounceTimer = null; + } + + resetDebounceTimer() { + console.log('cancelled, debouncing in 500'); + console.log(this.outstandingJSON); + if(this.debounceTimer) { + clearTimeout(this.debounceTimer); + this.debounceTimer = null; + } + this.debounceTimer = setTimeout(() => { + this.sendJSONToChannel(); + }, this.debounceInterval) } setOnChannelError(onError = (err) => {}) { @@ -75,16 +88,15 @@ class Channel { }); } - ack() { - if(this.lastAcknowledgedEventId === this.lastEventId) { - return; - } + clearQueue() { + clearTimeout(this.debounceTimer); + this.debounceTimer = null; this.sendJSONToChannel(); } // sends a poke to an app on an urbit ship // - poke(ship, app, mark, json, successFunc, failureFunc, queue = false) { + poke(ship, app, mark, json, successFunc, failureFunc) { let id = this.nextId(); this.outstandingPokes.set( id, @@ -103,11 +115,6 @@ class Channel { json }; - if(queue) { - this.outstandingJSON.push(j); - return; - } - this.sendJSONToChannel(j); } @@ -123,7 +130,6 @@ class Channel { eventFunc = () => {}, quitFunc = () => {}, subAckFunc = () => {}, - queue = false ) { let id = this.nextId(); this.outstandingSubscriptions.set( @@ -144,13 +150,9 @@ class Channel { path } - if(queue) { - this.outstandingJSON.push(json); - return id; - } - - this.sendJSONToChannel(json); + this.resetDebounceTimer(); + this.outstandingJSON.push(json); return id; } @@ -182,6 +184,9 @@ class Channel { // sends a JSON command command to the server. // sendJSONToChannel(j) { + if(!j && this.outstandingJSON.length === 0) { + return; + } let req = new XMLHttpRequest(); req.open("PUT", this.channelURL()); req.setRequestHeader("Content-Type", "application/json"); @@ -192,7 +197,6 @@ class Channel { } let x = JSON.stringify(this.outstandingJSON); req.send(x); - this.outstandingJSON = []; } else { // we add an acknowledgment to clear the server side queue // @@ -209,9 +213,9 @@ class Channel { let x = JSON.stringify(payload); req.send(x); - this.outstandingJSON = []; this.lastEventId = this.lastAcknowledgedEventId; } + this.outstandingJSON = []; this.connectIfDisconnected(); } @@ -253,6 +257,13 @@ class Channel { funcs["subAck"](obj); } } else if (obj.response == "diff") { + // ensure we ack before channel clogs + if((this.lastEventId - this.lastAcknowledgedEventId) > 30) { + clearTimeout(this.debounceTimer); + this.debounceTimer = null; + this.sendJSONToChannel(); + } + let funcs = subFuncs; funcs["event"](obj.json); } else if (obj.response == "quit") { diff --git a/pkg/interface/src/logic/subscription/base.ts b/pkg/interface/src/logic/subscription/base.ts index 15d76e787c..eb4b3b3afa 100644 --- a/pkg/interface/src/logic/subscription/base.ts +++ b/pkg/interface/src/logic/subscription/base.ts @@ -9,8 +9,8 @@ export default class BaseSubscription { this.channel.setOnChannelOpen(this.onChannelOpen.bind(this)); } - dequeue() { - this.channel.sendJSONToChannel(); + clearQueue() { + this.channel.clearQueue(); } delete() { @@ -42,7 +42,7 @@ export default class BaseSubscription { }, Math.pow(2,this.errorCount - 1) * 750); } - subscribe(path: Path, app: string, queue = false) { + subscribe(path: Path, app: string) { return this.api.subscribe(path, 'PUT', this.api.ship, app, this.handleEvent.bind(this), (err) => { @@ -51,7 +51,7 @@ export default class BaseSubscription { }, () => { this.subscribe(path, app); - }, queue); + }); } unsubscribe(id: number) { diff --git a/pkg/interface/src/logic/subscription/global.ts b/pkg/interface/src/logic/subscription/global.ts index 428106cf7d..31da978b5b 100644 --- a/pkg/interface/src/logic/subscription/global.ts +++ b/pkg/interface/src/logic/subscription/global.ts @@ -44,26 +44,20 @@ export default class GlobalSubscription extends BaseSubscription { start() { this.subscribe('/all', 'metadata-store'); - this.subscribe('/all', 'invite-store', true); - this.subscribe('/all', 'launch', true); - this.subscribe('/all', 'weather', true); - this.dequeue(); + this.subscribe('/all', 'invite-store'); + this.subscribe('/all', 'launch'); + this.subscribe('/all', 'weather'); + this.subscribe('/groups', 'group-store'); + this.clearQueue(); - setTimeout(() => { - this.subscribe('/groups', 'group-store', true); - this.subscribe('/primary', 'contact-view', true); - this.subscribe('/all', 's3-store', true); - this.subscribe('/keys', 'graph-store', true); - this.subscribe('/updates', 'hark-store', true); - this.subscribe('/updates', 'hark-graph-hook', true); - this.subscribe('/updates', 'hark-group-hook', true); - this.subscribe('/updates', 'hark-chat-hook', true); - this.dequeue(); - - }, 200) - - + this.subscribe('/primary', 'contact-view'); + this.subscribe('/all', 's3-store'); + this.subscribe('/keys', 'graph-store'); + this.subscribe('/updates', 'hark-store'); + this.subscribe('/updates', 'hark-graph-hook'); + this.subscribe('/updates', 'hark-group-hook'); + this.subscribe('/updates', 'hark-chat-hook'); } restart() { From 507bcfc9cbf7777d2cf1b3ec5f960a0cff5324fc Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Wed, 25 Nov 2020 16:42:09 +1000 Subject: [PATCH 04/38] glob: update to 0v5.c8agf.rjdcu.6p4ea.umc9e.5olmv --- pkg/arvo/app/glob.hoon | 2 +- pkg/arvo/app/landscape/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/arvo/app/glob.hoon b/pkg/arvo/app/glob.hoon index 472f938331..1cbd40a8c7 100644 --- a/pkg/arvo/app/glob.hoon +++ b/pkg/arvo/app/glob.hoon @@ -5,7 +5,7 @@ /- glob /+ default-agent, verb, dbug |% -++ hash 0v4.fpa4r.s6dtc.h8tps.62jv0.qn0fj +++ hash 0v5.c8agf.rjdcu.6p4ea.umc9e.5olmv +$ state-0 [%0 hash=@uv glob=(unit (each glob:glob tid=@ta))] +$ all-states $% state-0 diff --git a/pkg/arvo/app/landscape/index.html b/pkg/arvo/app/landscape/index.html index a2a06dea17..13e0753e6f 100644 --- a/pkg/arvo/app/landscape/index.html +++ b/pkg/arvo/app/landscape/index.html @@ -24,6 +24,6 @@
- + From 21dd7a9ab62ba95280236bc20a2a6ed567815b75 Mon Sep 17 00:00:00 2001 From: Brendan Hay Date: Wed, 25 Nov 2020 15:33:52 +0100 Subject: [PATCH 05/38] build: split artefact upload into separate release workflow --- .github/workflows/build.yml | 45 +++-------------------------------- .github/workflows/release.yml | 40 +++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28d4b19b3d..ca821bc083 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,11 +30,9 @@ # # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions -name: Build, test, and upload urbit release tarball +name: Build and test urbit binaries -on: - push: null - pull_request: null +on: [push, pull_request] jobs: urbit: @@ -57,7 +55,7 @@ jobs: - run: nix-build -A urbit --arg enableStatic true - - if: ${{ matrix.os == 'ubuntu-latest' }} + - if: ${{ matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' }} run: nix-build -A urbit-tests haskell: @@ -81,40 +79,3 @@ jobs: - run: nix-build -A hs.urbit-king.components.exes.urbit-king --arg enableStatic true - run: nix-build -A hs-checks - run: nix-build shell.nix - - upload: - needs: [urbit, haskell] - strategy: - matrix: - include: - - { os: ubuntu-latest, system: x86_64-linux } - - { os: macos-latest, system: x86_64-darwin } - - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v2 - - uses: cachix/install-nix-action@v12 - - uses: cachix/cachix-action@v8 - with: - name: mars - authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} - - - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - version: '290.0.1' - service_account_key: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }} - project_id: ${{ secrets.GCS_PROJECT }} - export_default_credentials: true - - - run: nix-build -A tarball - - - name: Run upload to bootstrap.urbit.org - run: | - version="$(cat ./pkg/urbit/version)" - system="$(nix eval --raw '(builtins.currentSystem)')" - target="gs://bootstrap.urbit.org/ci/urbit-v${version}-${system}-${GITHUB_SHA:0:9}.tgz" - - gsutil cp -n ./result "$target" - - echo "upload to $target complete." diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..97a3cf4520 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: Upload urbit release tarball + +on: [release] + +jobs: + upload: + strategy: + matrix: + include: + - { os: ubuntu-latest, system: x86_64-linux } + - { os: macos-latest, system: x86_64-darwin } + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + - uses: cachix/install-nix-action@v12 + - uses: cachix/cachix-action@v8 + with: + name: mars + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + + - uses: google-github-actions/setup-gcloud@v0.2.0 + with: + version: '290.0.1' + service_account_key: ${{ secrets.GCS_SERVICE_ACCOUNT_KEY }} + project_id: ${{ secrets.GCS_PROJECT }} + export_default_credentials: true + + - run: nix-build -A tarball + + - name: Run upload to bootstrap.urbit.org + run: | + version="$(cat ./pkg/urbit/version)" + system="$(nix eval --raw '(builtins.currentSystem)')" + target="gs://bootstrap.urbit.org/ci/urbit-v${version}-${system}-${GITHUB_SHA:0:9}.tgz" + + gsutil cp -n ./result "$target" + + echo "upload to $target complete." From f851803d3c350c6bba1bd8c738bf605d66592789 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Thu, 26 Nov 2020 15:42:23 +1000 Subject: [PATCH 06/38] pull-hook: do not crash on dangling sync If the %kick handler of the inner-core crashes, then we never get to resubscribe, thus leaving a dangling entry in the state with no corresponding subscription. Updates the pull-hook-action pokes to not crash when given a dangling entry. --- pkg/arvo/lib/pull-hook.hoon | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkg/arvo/lib/pull-hook.hoon b/pkg/arvo/lib/pull-hook.hoon index cb3b5e6f73..3c5ef03b3b 100644 --- a/pkg/arvo/lib/pull-hook.hoon +++ b/pkg/arvo/lib/pull-hook.hoon @@ -304,33 +304,35 @@ =. tracking (~(put by tracking) resource ship) :_ state - ~[(watch-resource resource /)] + (watch-resource resource /) :: ++ remove |= =resource - :- ~[(leave-resource resource)] + :- (leave-resource resource) state(tracking (~(del by tracking) resource)) -- :: ++ leave-resource |= rid=resource - ^- card - =/ =ship - (~(got by tracking) rid) + ^- (list card) + =/ ship=(unit ship) + (~(get by tracking) rid) + ?~ ship ~ =/ =wire (make-wire pull+resource+(en-path:resource rid)) - [%pass wire %agent [ship push-hook-name.config] %leave ~] + [%pass wire %agent [u.ship push-hook-name.config] %leave ~]~ ++ watch-resource |= [rid=resource pax=path] - ^- card - =/ =ship - (~(got by tracking) rid) + ^- (list card) + =/ ship=(unit ship) + (~(get by tracking) rid) + ?~ ship ~ =/ =path (welp resource+(en-path:resource rid) pax) =/ =wire (make-wire pull+path) - [%pass wire %agent [ship push-hook-name.config] %watch path] + [%pass wire %agent [u.ship push-hook-name.config] %watch path]~ :: ++ make-wire |= =wire From f73a96ba904ec12f31cdd7f0dab209db1c7ee885 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Thu, 26 Nov 2020 16:09:14 +1000 Subject: [PATCH 07/38] pull-hook: backstop crashed kick handler Virtualises the kick handler for the inner door in lib/pull-hook, so that crashes in the handler do not cause a dangling resource with no subscription. Additionally, failed kicks now cause the sync to be dropped into a failed-kicks map in the state, where we attempt to recover from the failure in the on-load. --- pkg/arvo/lib/pull-hook.hoon | 101 +++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 12 deletions(-) diff --git a/pkg/arvo/lib/pull-hook.hoon b/pkg/arvo/lib/pull-hook.hoon index 3c5ef03b3b..78566ad3c2 100644 --- a/pkg/arvo/lib/pull-hook.hoon +++ b/pkg/arvo/lib/pull-hook.hoon @@ -49,13 +49,21 @@ inner-state=vase == :: ++$ base-state-1 + $: base-state-0 + failed-kicks=(map resource ship) + == +:: +$ state-0 [%0 base-state-0] :: +$ state-1 [%1 base-state-0] :: ++$ state-2 [%2 base-state-1] +:: +$ versioned-state $% state-0 state-1 + state-2 == :: ++ default @@ -141,7 +149,7 @@ ++ agent |* =config |= =(pull-hook config) - =| state-1 + =| state-2 =* state - ^- agent:gall =< @@ -155,6 +163,7 @@ =^ cards pull-hook on-init:og [cards this] + :: ++ on-load |= =old=vase =/ old @@ -162,10 +171,16 @@ =| cards=(list card:agent:gall) |^ ?- -.old - %1 + %2 =^ og-cards pull-hook (on-load:og inner-state.old) - [(weld cards og-cards) this(state old)] + =. state old + =^ retry-cards state + retry-failed-kicks + :_ this + :(weld cards og-cards retry-cards) + :: + %1 $(old [%2 +.old ~]) :: %0 %_ $ @@ -175,6 +190,22 @@ (weld cards (missing-subscriptions tracking.old)) == == + :: + ++ retry-failed-kicks + =| acc-cards=(list card) + =/ failures=(list [rid=resource =ship]) + ~(tap by failed-kicks) + =. tracking + (~(uni by tracking) failed-kicks) + =. failed-kicks ~ + |- ^- (quip card _state) + ?~ failures + [acc-cards state] + =, failures + =^ crds state + (handle-kick:hc i) + $(failures t, acc-cards (weld acc-cards crds)) + :: ++ missing-subscriptions |= tracking=(map resource ship) ^- (list card:agent:gall) @@ -232,15 +263,9 @@ (de-path:resource t.t.t.t.wire) ?+ -.sign (on-agent:def wire sign) %kick - =/ pax=(unit path) - (on-pull-kick:og rid) - ?^ pax - :_ this - ~[(watch-resource:hc rid u.pax)] - =. tracking - (~(del by tracking) rid) - :_ this - ~[give-update] + =^ cards state + (handle-kick:hc rid src.bowl) + [cards this] :: %watch-ack ?~ p.sign @@ -286,6 +311,58 @@ -- |_ =bowl:gall +* og ~(. pull-hook bowl) + ++ mule-scry + |= [ref=* raw=*] + =/ pax=(unit path) + ((soft path) raw) + ?~ pax ~ + ?. ?=([@ @ @ @ *] u.pax) ~ + =/ ship + (slaw %p i.t.u.pax) + =/ ved + (slay i.t.t.t.u.pax) + =/ dat + ?~ ved now.bowl + =/ cas=(unit case) + ((soft case) p.u.ved) + ?~ cas now.bowl + ?: ?=(%da -.u.cas) + p.u.cas + now.bowl + :: catch bad gall scries early + ?: ?& =((end 3 1 i.u.pax) %g) + ?| !=(`our.bowl ship) + !=(dat now.bowl) + == + == + ~ + ``.^(* u.pax) + ++ handle-kick + |= [rid=resource =ship] + ^- (quip card _state) + =/ res=toon + (mock [|.((on-pull-kick:og rid)) %9 2 %0 1] mule-scry) + =/ pax=(unit path) + !< (unit path) + :- -:!>(*(unit path)) + ?:(?=(%0 -.res) p.res ~) + =? failed-kicks !?=(%0 -.res) + =/ tang + :+ leaf+"failed kick handler, please report" + leaf+"{} in {(trip dap.bowl)}" + ?: ?=(%2 -.res) + p.res + ?> ?=(%1 -.res) + (turn `(list *)`p.res (cork path smyt)) + %- (slog tang) + (~(put by failed-kicks) rid ship) + ?^ pax + :_ state + (watch-resource rid u.pax) + =. tracking + (~(del by tracking) rid) + :_ state + ~[give-update] :: ++ poke-hook-action |= =action From 03fd56e8ccc5f9603397214343258cdcba9d2296 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 1 Dec 2020 23:38:02 +0100 Subject: [PATCH 08/38] various: start threads with unit of tuple args Instead of a list of arguments, with trailing ~. --- pkg/arvo/app/dojo.hoon | 12 +++++++++++- pkg/arvo/app/glob.hoon | 2 +- pkg/arvo/app/observe-hook.hoon | 2 +- pkg/arvo/app/spider.hoon | 2 +- pkg/arvo/ted/build-cast.hoon | 2 +- pkg/arvo/ted/build-file.hoon | 2 +- pkg/arvo/ted/build-mark.hoon | 2 +- pkg/arvo/ted/diff.hoon | 2 +- pkg/arvo/ted/dns/address.hoon | 2 +- pkg/arvo/ted/glob.hoon | 2 +- pkg/arvo/ted/graph/create.hoon | 2 +- pkg/arvo/ted/graph/delete.hoon | 2 +- pkg/arvo/ted/graph/groupify.hoon | 2 +- pkg/arvo/ted/graph/join.hoon | 2 +- pkg/arvo/ted/graph/leave.hoon | 2 +- pkg/arvo/ted/graph/restore.hoon | 2 +- pkg/arvo/ted/hi.hoon | 5 +++-- pkg/arvo/ted/invite/accepted-graph.hoon | 9 ++++----- pkg/arvo/ted/migrate-channels.hoon | 2 +- pkg/arvo/ted/read.hoon | 2 +- pkg/arvo/ted/test.hoon | 4 +++- pkg/arvo/ted/time.hoon | 2 +- pkg/arvo/ted/tree.hoon | 2 +- 23 files changed, 40 insertions(+), 28 deletions(-) diff --git a/pkg/arvo/app/dojo.hoon b/pkg/arvo/app/dojo.hoon index c34dd8ea89..c2bc08f3b3 100644 --- a/pkg/arvo/app/dojo.hoon +++ b/pkg/arvo/app/dojo.hoon @@ -728,6 +728,16 @@ :: ++ dy-cage |=(num=@ud (~(got by rez) num)) :: known cage ++ dy-vase |=(num=@ud q:(dy-cage num)) :: known vase + :: + ++ dy-some + |= src=(list dojo-source) + ^- vase + ?~ src !>(~) + %+ slop !>(~) + |- + ?~ t.src (dy-vase p.i.src) + (slop (dy-vase p.i.src) $(src t.src)) + :: ++ dy-sore |= src=(list dojo-source) ^- vase @@ -850,7 +860,7 @@ [%pass /wool %agent [our.hid %spider] %watch /thread-result/[tid]] %- he-card =/ =cage :: also sub - [%spider-start !>([~ `tid fil (dy-sore src)])] + [%spider-start !>([~ `tid fil (dy-some src)])] [%pass /wool %agent [our.hid %spider] %poke cage] :: ++ dy-make :: build step diff --git a/pkg/arvo/app/glob.hoon b/pkg/arvo/app/glob.hoon index 472f938331..23d18118ab 100644 --- a/pkg/arvo/app/glob.hoon +++ b/pkg/arvo/app/glob.hoon @@ -183,7 +183,7 @@ ^- (quip card _this) ?: ?=([%start ~] wire) =/ new-tid=@ta (cat 3 'glob--' (scot %uv eny.bowl)) - =/ args [~ `new-tid %glob !>([hash.state ~])] + =/ args [~ `new-tid %glob !>([~ hash.state])] =/ action !>([%unserve-dir serve-path]) :_ this(glob.state `[%| new-tid]) :~ (poke-file-server our.bowl %file-server-action action) diff --git a/pkg/arvo/app/observe-hook.hoon b/pkg/arvo/app/observe-hook.hoon index 174b90b13c..71b9e08f3f 100644 --- a/pkg/arvo/app/observe-hook.hoon +++ b/pkg/arvo/app/observe-hook.hoon @@ -148,7 +148,7 @@ [our.bowl %spider] %poke %spider-start - !>([~ `tid thread.observer (slop q.cage.sign !>(~))]) + !>([~ `tid thread.observer (slop !>(~) q.cage.sign)]) == == == :: diff --git a/pkg/arvo/app/spider.hoon b/pkg/arvo/app/spider.hoon index a328e0d476..bb3c360e66 100644 --- a/pkg/arvo/app/spider.hoon +++ b/pkg/arvo/app/spider.hoon @@ -290,7 +290,7 @@ =/ body=json (need (de-json:html q.u.body.request.inbound-request)) =/ input=vase - (slop (tube !>(body)) !>(~)) + (slop !>(~) (tube !>(body))) =/ =start-args [~ `tid thread input] =^ cards state diff --git a/pkg/arvo/ted/build-cast.hoon b/pkg/arvo/ted/build-cast.hoon index cf0a1c508d..fe85b0a180 100644 --- a/pkg/arvo/ted/build-cast.hoon +++ b/pkg/arvo/ted/build-cast.hoon @@ -5,7 +5,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([pax=path ~] arg) +=+ !<([~ pax=path] arg) ?~ bem=(de-beam:format pax) (strand-fail:strand %path-not-beam >pax< ~) =/ =mars:clay [i i.t]:?>(?=([@ @ ~] s.u.bem) s.u.bem) diff --git a/pkg/arvo/ted/build-file.hoon b/pkg/arvo/ted/build-file.hoon index 8b3bda350a..55f231db76 100644 --- a/pkg/arvo/ted/build-file.hoon +++ b/pkg/arvo/ted/build-file.hoon @@ -5,7 +5,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([pax=path ~] arg) +=+ !<([~ pax=path] arg) ?^ bem=(de-beam:format pax) (build-file:strandio u.bem) (strand-fail:strand %path-not-beam >pax< ~) diff --git a/pkg/arvo/ted/build-mark.hoon b/pkg/arvo/ted/build-mark.hoon index a134c896fe..72b4ffe9e3 100644 --- a/pkg/arvo/ted/build-mark.hoon +++ b/pkg/arvo/ted/build-mark.hoon @@ -5,7 +5,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([pax=path ~] arg) +=+ !<([~ pax=path] arg) ?~ bem=(de-beam:format pax) (strand-fail:strand %path-not-beam >pax< ~) =/ =mark (rear s.u.bem) diff --git a/pkg/arvo/ted/diff.hoon b/pkg/arvo/ted/diff.hoon index 580416a4a7..6a4ff6cfd7 100644 --- a/pkg/arvo/ted/diff.hoon +++ b/pkg/arvo/ted/diff.hoon @@ -6,7 +6,7 @@ =/ m (strand ,vase) ^- form:m |^ -=+ !<([=a=path =b=path ~] arg) +=+ !<([~ =a=path =b=path] arg) =/ a-mark=mark -:(flop a-path) =/ b-mark=mark -:(flop b-path) ?. =(a-mark b-mark) diff --git a/pkg/arvo/ted/dns/address.hoon b/pkg/arvo/ted/dns/address.hoon index a5f5fb4b04..faf5b902c8 100644 --- a/pkg/arvo/ted/dns/address.hoon +++ b/pkg/arvo/ted/dns/address.hoon @@ -6,7 +6,7 @@ |^ =/ m (strand ,vase) ^- form:m -=+ !< [adr=address:dns ~] arg +=+ !< [~ adr=address:dns] arg :: ;< our=ship bind:m get-our:strandio =/ rac (clan:title our) diff --git a/pkg/arvo/ted/glob.hoon b/pkg/arvo/ted/glob.hoon index d50e7a114a..c207b7a1c8 100644 --- a/pkg/arvo/ted/glob.hoon +++ b/pkg/arvo/ted/glob.hoon @@ -5,7 +5,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([hash=@uv ~] arg) +=+ !<([~ hash=@uv] arg) =/ url "https://bootstrap.urbit.org/glob-{(scow %uv hash)}.glob" ;< =cord bind:m (fetch-cord:strandio url) =+ ;;(=glob:glob (cue cord)) diff --git a/pkg/arvo/ted/graph/create.hoon b/pkg/arvo/ted/graph/create.hoon index e0c5448186..6e81e6636e 100644 --- a/pkg/arvo/ted/graph/create.hoon +++ b/pkg/arvo/ted/graph/create.hoon @@ -29,7 +29,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([=action:graph-view ~] arg) +=+ !<([~ =action:graph-view] arg) ?> ?=(%create -.action) ;< =bowl:spider bind:m get-bowl:strandio :: diff --git a/pkg/arvo/ted/graph/delete.hoon b/pkg/arvo/ted/graph/delete.hoon index 1ffcdd97dc..8a3ea1b780 100644 --- a/pkg/arvo/ted/graph/delete.hoon +++ b/pkg/arvo/ted/graph/delete.hoon @@ -57,7 +57,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([=action:graph-view ~] arg) +=+ !<([~ =action:graph-view] arg) ?> ?=(%delete -.action) ;< =bowl:spider bind:m get-bowl:strandio ?. =(our.bowl entity.rid.action) diff --git a/pkg/arvo/ted/graph/groupify.hoon b/pkg/arvo/ted/graph/groupify.hoon index 58a9ec4a90..7117f01e64 100644 --- a/pkg/arvo/ted/graph/groupify.hoon +++ b/pkg/arvo/ted/graph/groupify.hoon @@ -43,7 +43,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([=action:graph-view ~] arg) +=+ !<([~ =action:graph-view] arg) ?> ?=(%groupify -.action) ;< =group bind:m (scry-group rid.action) ?. hidden.group diff --git a/pkg/arvo/ted/graph/join.hoon b/pkg/arvo/ted/graph/join.hoon index b4ebffff88..2e46fd9090 100644 --- a/pkg/arvo/ted/graph/join.hoon +++ b/pkg/arvo/ted/graph/join.hoon @@ -28,7 +28,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([=action:graph-view ~] arg) +=+ !<([~ =action:graph-view] arg) ?> ?=(%join -.action) ;< =bowl:spider bind:m get-bowl:strandio ?: =(our.bowl entity.rid.action) diff --git a/pkg/arvo/ted/graph/leave.hoon b/pkg/arvo/ted/graph/leave.hoon index 9d0bc6797e..382841a7f7 100644 --- a/pkg/arvo/ted/graph/leave.hoon +++ b/pkg/arvo/ted/graph/leave.hoon @@ -49,7 +49,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([=action:graph-view ~] arg) +=+ !<([~ =action:graph-view] arg) ?> ?=(%leave -.action) ;< =bowl:spider bind:m get-bowl:strandio ?: =(our.bowl entity.rid.action) diff --git a/pkg/arvo/ted/graph/restore.hoon b/pkg/arvo/ted/graph/restore.hoon index 5ed59534fd..ae03aa15e3 100644 --- a/pkg/arvo/ted/graph/restore.hoon +++ b/pkg/arvo/ted/graph/restore.hoon @@ -12,7 +12,7 @@ =/ m (strand ,vase) ^- form:m =+ !< - [[rid=resource title=@t description=@t group=resource module=@t ~] ~] + [~ rid=resource title=@t description=@t group=resource module=@t ~] arg ;< =bowl:spider bind:m get-bowl:strandio :: unarchive graph and share it diff --git a/pkg/arvo/ted/hi.hoon b/pkg/arvo/ted/hi.hoon index 2410c02110..5e02680a21 100644 --- a/pkg/arvo/ted/hi.hoon +++ b/pkg/arvo/ted/hi.hoon @@ -5,7 +5,8 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([who=ship mez=$@(~ [=tape ~])] arg) -=/ message ?~(mez '' (crip tape.mez)) +=+ !<([~ arg=$@(who=ship [who=ship mez=tape])] arg) +=/ [who=ship message=@t] + ?@(arg [who.arg ''] [who.arg (crip mez.arg)]) ;< ~ bind:m (poke:strandio [who %hood] %helm-hi !>(message)) (pure:m !>("hi {} successful")) diff --git a/pkg/arvo/ted/invite/accepted-graph.hoon b/pkg/arvo/ted/invite/accepted-graph.hoon index bb1227082d..23aa836d27 100644 --- a/pkg/arvo/ted/invite/accepted-graph.hoon +++ b/pkg/arvo/ted/invite/accepted-graph.hoon @@ -10,7 +10,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([=update:inv ~] arg) +=+ !<([~ =update:inv] arg) ?. ?=(%accepted -.update) (pure:m !>(~)) ;< =bowl:spider bind:m get-bowl:strandio @@ -21,8 +21,7 @@ ;< ~ bind:m %+ poke-our %spider =- spider-start+!>([`tid.bowl ~ %graph-join -]) - %+ slop - !> ^- action:graph-view - [%join resource.invite ship.invite] - !>(~) + %+ slop !>(~) + !> ^- action:graph-view + [%join resource.invite ship.invite] (pure:m !>(~)) diff --git a/pkg/arvo/ted/migrate-channels.hoon b/pkg/arvo/ted/migrate-channels.hoon index 4abc4b3f44..8334ccae47 100644 --- a/pkg/arvo/ted/migrate-channels.hoon +++ b/pkg/arvo/ted/migrate-channels.hoon @@ -5,7 +5,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=/ [og-path=path ng-path=path ~] !<([path path ~] arg) +=/ [~ og-path=path ng-path=path] !<([~ path path] arg) ;< bol=bowl:spider bind:m get-bowl:strandio |^ :: diff --git a/pkg/arvo/ted/read.hoon b/pkg/arvo/ted/read.hoon index 12816e9850..6d313c2ed4 100644 --- a/pkg/arvo/ted/read.hoon +++ b/pkg/arvo/ted/read.hoon @@ -7,7 +7,7 @@ ^- form:m :: Parse arguments as ship, desk, and path :: -=+ !<([=care:clay =ship =desk =case =target=path ~] arg) +=+ !<([~ =care:clay =ship =desk =case =target=path] arg) :: Read the file, possibly asyncrhonously :: ;< =bowl:spider bind:m get-bowl:strandio diff --git a/pkg/arvo/ted/test.hoon b/pkg/arvo/ted/test.hoon index f327adb926..755efd3529 100644 --- a/pkg/arvo/ted/test.hoon +++ b/pkg/arvo/ted/test.hoon @@ -104,8 +104,10 @@ |= arg=vase =/ m (strand ,vase) ^- form:m +=/ paz=(list path) + (tail !<([~ (list path)] arg)) =/ bez=(list beam) - (turn !<((list path) arg) |=(p=path (need (de-beam:format p)))) + (turn paz |=(p=path (need (de-beam:format p)))) ;< fiz=(set [=beam test=(unit term)]) bind:m (find-test-files bez) => .(fiz (sort ~(tap in fiz) aor)) =| test-arms=(map path (list test-arm)) diff --git a/pkg/arvo/ted/time.hoon b/pkg/arvo/ted/time.hoon index 02ba813c15..be3ff6dd0c 100644 --- a/pkg/arvo/ted/time.hoon +++ b/pkg/arvo/ted/time.hoon @@ -5,7 +5,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([arg=@dr ~] arg) +=+ !<([~ arg=@dr] arg) ;< now-1=@da bind:m get-time:strandio ;< ~ bind:m (sleep:strandio arg) ;< now-2=@da bind:m get-time:strandio diff --git a/pkg/arvo/ted/tree.hoon b/pkg/arvo/ted/tree.hoon index 63dec6e08b..682cf8015c 100644 --- a/pkg/arvo/ted/tree.hoon +++ b/pkg/arvo/ted/tree.hoon @@ -5,7 +5,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([pax=path ~] arg) +=+ !<([~ pax=path] arg) ;< bek=beak bind:m get-beak:strandio ;< paz=(list path) bind:m (list-tree:strandio bek (flop pax)) (pure:m !>(paz)) From 85cd81be1c11582c409f6861f76c036a747d3939 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Tue, 1 Dec 2020 18:18:32 -0500 Subject: [PATCH 09/38] publish: add 'cancel' button to edit form --- .../apps/publish/components/EditPost.tsx | 2 + .../apps/publish/components/NoteForm.tsx | 50 +++++++++++-------- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/pkg/interface/src/views/apps/publish/components/EditPost.tsx b/pkg/interface/src/views/apps/publish/components/EditPost.tsx index 1b5cae127c..8e96ec82b8 100644 --- a/pkg/interface/src/views/apps/publish/components/EditPost.tsx +++ b/pkg/interface/src/views/apps/publish/components/EditPost.tsx @@ -50,6 +50,8 @@ export function EditPost(props: EditPostProps & RouteComponentProps) { return ( @@ -21,8 +23,8 @@ interface PostFormProps { } const formSchema = Yup.object({ - title: Yup.string().required("Title cannot be blank"), - body: Yup.string().required("Post cannot be blank"), + title: Yup.string().required('Title cannot be blank'), + body: Yup.string().required('Post cannot be blank') }); export interface PostFormSchema { @@ -31,7 +33,7 @@ export interface PostFormSchema { } export function PostForm(props: PostFormProps) { - const { initial, onSubmit, submitLabel, loadingText } = props; + const { initial, onSubmit, cancel, submitLabel, loadingText, history } = props; return ( @@ -41,18 +43,26 @@ export function PostForm(props: PostFormProps) { onSubmit={onSubmit} validateOnBlur > -
- + + - + + {submitLabel} + + {cancel && } + From e2fa71c5ca7bc139846767754631dd547843f670 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Tue, 1 Dec 2020 10:49:10 +1000 Subject: [PATCH 10/38] interface: bump indigo --- pkg/interface/package-lock.json | 6 +++--- pkg/interface/package.json | 2 +- .../src/views/apps/launch/components/tiles/tile.js | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/interface/package-lock.json b/pkg/interface/package-lock.json index 1adb54bcd5..09d985c69c 100644 --- a/pkg/interface/package-lock.json +++ b/pkg/interface/package-lock.json @@ -1693,9 +1693,9 @@ "integrity": "sha512-3OPSdf9cejP/TSzWXuBaYbzLtAfBzQnc75SlPLkoPfwpxnv1Bvy9hiWngLY0WnKRR6lMOldnkYQCCuNWeDibYQ==" }, "@tlon/indigo-react": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@tlon/indigo-react/-/indigo-react-1.2.13.tgz", - "integrity": "sha512-6qYLjVcGZtDjI+BqS2PRrfAh9mUCDtYwDOHuYuPyV87mdVRAhduBlQ/3tDVlTNWICF9DeAhozeClxalACs5Ipw==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@tlon/indigo-react/-/indigo-react-1.2.5.tgz", + "integrity": "sha512-NOQTwH74l/XXMIfQ4ZzymvZuk1WK1nmO552TmXrQxBUSb7HmdlA8anG5oRrvnLJTkajLCY59McLkDca+lCcvwg==", "requires": { "@reach/menu-button": "^0.10.5", "react": "^16.13.1", diff --git a/pkg/interface/package.json b/pkg/interface/package.json index 5786f7494e..af7d355078 100644 --- a/pkg/interface/package.json +++ b/pkg/interface/package.json @@ -9,7 +9,7 @@ "@reach/menu-button": "^0.10.5", "@reach/tabs": "^0.10.5", "@tlon/indigo-light": "^1.0.3", - "@tlon/indigo-react": "1.2.13", + "@tlon/indigo-react": "1.2.5", "@tlon/sigil-js": "^1.4.2", "aws-sdk": "^2.726.0", "big-integer": "^1.6.48", diff --git a/pkg/interface/src/views/apps/launch/components/tiles/tile.js b/pkg/interface/src/views/apps/launch/components/tiles/tile.js index a83d46b4a5..d83862a358 100644 --- a/pkg/interface/src/views/apps/launch/components/tiles/tile.js +++ b/pkg/interface/src/views/apps/launch/components/tiles/tile.js @@ -18,6 +18,7 @@ const SquareBox = styled(Box)` position: absolute; top: 0; } + position: relative; `; const routeList = defaultApps.map(a => `/~${a}`); From 4e9c13834c3ac00f0aa55d9c03dd3764e7631fde Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Wed, 2 Dec 2020 12:09:26 +1000 Subject: [PATCH 11/38] channel.js: address L review --- pkg/arvo/app/landscape/js/channel.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/arvo/app/landscape/js/channel.js b/pkg/arvo/app/landscape/js/channel.js index 1c089ff80c..2f10d6bc6c 100644 --- a/pkg/arvo/app/landscape/js/channel.js +++ b/pkg/arvo/app/landscape/js/channel.js @@ -63,8 +63,6 @@ class Channel { } resetDebounceTimer() { - console.log('cancelled, debouncing in 500'); - console.log(this.outstandingJSON); if(this.debounceTimer) { clearTimeout(this.debounceTimer); this.debounceTimer = null; @@ -259,9 +257,7 @@ class Channel { } else if (obj.response == "diff") { // ensure we ack before channel clogs if((this.lastEventId - this.lastAcknowledgedEventId) > 30) { - clearTimeout(this.debounceTimer); - this.debounceTimer = null; - this.sendJSONToChannel(); + this.clearQueue(); } let funcs = subFuncs; From 613281e5870f1699c0feda9c391dd57b88d364d6 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Wed, 2 Dec 2020 15:48:12 -0500 Subject: [PATCH 12/38] chat: add leading sig when copying patp Fixes #4059. --- pkg/interface/src/views/apps/chat/components/ChatMessage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx index 7c3ec900bb..4fe7e6700c 100644 --- a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx +++ b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx @@ -240,7 +240,7 @@ export class MessageWithSigil extends PureComponent { className={`mw5 db truncate pointer`} ref={e => nameSpan = e} onClick={() => { - writeText(msg.author); + writeText(`~${msg.author}`); copyNotice(name); }} title={`~${msg.author}`} From 0711c15be9e2fe87da886a5933b3ea01f96c86d9 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Wed, 2 Dec 2020 16:01:00 -0500 Subject: [PATCH 13/38] chat: mobile input uses textarea --- pkg/interface/src/views/apps/chat/components/chat-editor.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/interface/src/views/apps/chat/components/chat-editor.js b/pkg/interface/src/views/apps/chat/components/chat-editor.js index 2bf49bf7e4..93cdea4f47 100644 --- a/pkg/interface/src/views/apps/chat/components/chat-editor.js +++ b/pkg/interface/src/views/apps/chat/components/chat-editor.js @@ -3,7 +3,7 @@ import { UnControlled as CodeEditor } from 'react-codemirror2'; import { MOBILE_BROWSER_REGEX } from "~/logic/lib/util"; import CodeMirror from 'codemirror'; -import { Row, BaseInput } from '@tlon/indigo-react'; +import { Row, BaseTextArea } from '@tlon/indigo-react'; import 'codemirror/mode/markdown/markdown'; import 'codemirror/addon/display/placeholder'; @@ -167,9 +167,10 @@ export default class ChatEditor extends Component { color="black" > {MOBILE_BROWSER_REGEX.test(navigator.userAgent) - ? { From b95e8a46d7f70f9ab7fed45263b279562067f906 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Wed, 2 Dec 2020 16:07:58 -0500 Subject: [PATCH 14/38] chat: even padding on daybreak --- .../src/views/apps/chat/components/ChatMessage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx index 4fe7e6700c..3fdcabdf29 100644 --- a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx +++ b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx @@ -23,9 +23,9 @@ export const UnreadMarker = React.forwardRef(({ dayBreak, when }, ref) => ( )); export const DayBreak = ({ when }) => ( -
-

{moment(when).calendar(null, { sameElse: DATESTAMP_FORMAT })}

-
+ + {moment(when).calendar(null, { sameElse: DATESTAMP_FORMAT })} + ); interface ChatMessageProps { From ae3b40271df37bde2362b853d42051030cf8bfc5 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Wed, 2 Dec 2020 16:12:37 -0500 Subject: [PATCH 15/38] groups: prevent admins from banning themselves --- .../src/views/landscape/components/Participants.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/interface/src/views/landscape/components/Participants.tsx b/pkg/interface/src/views/landscape/components/Participants.tsx index 7f383d342b..a706c428fe 100644 --- a/pkg/interface/src/views/landscape/components/Participants.tsx +++ b/pkg/interface/src/views/landscape/components/Participants.tsx @@ -347,7 +347,7 @@ function Participant(props: { {props.role === 'admin' && ( <> - {!isInvite && ( + {(!isInvite && contact.patp !== window.ship) && ( Ban from {title} @@ -358,9 +358,9 @@ function Participant(props: { ) : ( <> - + {(contact.patp !== window.ship) && ( Kick from {title} - + )} Promote to Admin From 44a17db1fb50efd910fa4a35bfb7aa94b203d7e3 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Wed, 2 Dec 2020 16:16:02 -0500 Subject: [PATCH 16/38] groups: prevent demoting yourself if only admin --- pkg/interface/src/views/landscape/components/Participants.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/interface/src/views/landscape/components/Participants.tsx b/pkg/interface/src/views/landscape/components/Participants.tsx index a706c428fe..46836fc0e4 100644 --- a/pkg/interface/src/views/landscape/components/Participants.tsx +++ b/pkg/interface/src/views/landscape/components/Participants.tsx @@ -353,9 +353,9 @@ function Participant(props: { )} {role === 'admin' ? ( - + group?.tags?.role?.admin?.size > 1 && ( Demote from Admin - + ) ) : ( <> {(contact.patp !== window.ship) && ( From 3283bd7134f4b917e99869db65c1345790558a72 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Wed, 2 Dec 2020 16:21:04 -0500 Subject: [PATCH 17/38] groups: add margin to mobile invite popover --- .../src/views/landscape/components/InvitePopover.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/interface/src/views/landscape/components/InvitePopover.tsx b/pkg/interface/src/views/landscape/components/InvitePopover.tsx index 4c6a20acb5..d66044f351 100644 --- a/pkg/interface/src/views/landscape/components/InvitePopover.tsx +++ b/pkg/interface/src/views/landscape/components/InvitePopover.tsx @@ -90,7 +90,9 @@ export function InvitePopover(props: InvitePopoverProps) { borderColor="washedGray" borderRadius={1} maxHeight="472px" - width="380px" + width="100%" + maxWidth="380px" + mx={[4,0]} bg="white" > Date: Wed, 2 Dec 2020 16:23:30 -0500 Subject: [PATCH 18/38] profile: amend mobile 'back' link size --- pkg/interface/src/views/apps/profile/profile.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/interface/src/views/apps/profile/profile.tsx b/pkg/interface/src/views/apps/profile/profile.tsx index 7bcae36c72..72b716a113 100644 --- a/pkg/interface/src/views/apps/profile/profile.tsx +++ b/pkg/interface/src/views/apps/profile/profile.tsx @@ -104,6 +104,7 @@ export default function ProfileScreen(props: any) { alignItems="center" px={3} borderBottom={1} + fontSize='0' borderBottomColor="washedGray" > {"<- Back"} From 000e8c69648e7a3538eaf84d3351c03dc1cf531f Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Wed, 2 Dec 2020 16:35:39 -0500 Subject: [PATCH 19/38] profile: add icons, sidebar bg matches others --- .../src/views/apps/profile/profile.tsx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkg/interface/src/views/apps/profile/profile.tsx b/pkg/interface/src/views/apps/profile/profile.tsx index 72b716a113..672aa74f15 100644 --- a/pkg/interface/src/views/apps/profile/profile.tsx +++ b/pkg/interface/src/views/apps/profile/profile.tsx @@ -12,7 +12,16 @@ import { ContactCard } from "~/views/landscape/components/ContactCard"; const SidebarItem = ({ children, view, current }) => { const selected = current === view; - const color = selected ? "blue" : "black"; + const icon = (view) => { + switch(view) { + case 'identity': + return 'Smiley'; + case 'settings': + return 'Adjust'; + default: + return 'Circle' + } + } return ( { verticalAlign="middle" py={1} px={3} - backgroundColor={selected ? "washedBlue" : "white"} + backgroundColor={selected ? "washedGray" : "white"} > - - + + {children} From 49d66989fd5a04913d7b7fd387a27ba9be8d1f06 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Wed, 2 Dec 2020 17:09:22 -0500 Subject: [PATCH 20/38] groups: fix sharing contacts with avatars Fixes #4064. --- .../src/views/landscape/components/ContactCard.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/interface/src/views/landscape/components/ContactCard.tsx b/pkg/interface/src/views/landscape/components/ContactCard.tsx index e167ea8a3a..eee9e57a22 100644 --- a/pkg/interface/src/views/landscape/components/ContactCard.tsx +++ b/pkg/interface/src/views/landscape/components/ContactCard.tsx @@ -71,12 +71,15 @@ const emptyContact = { export function ContactCard(props: ContactCardProps) { const us = `~${window.ship}`; const { contact, rootIdentity } = props; - const onSubmit = async (values: Contact, actions: FormikHelpers) => { + const onSubmit = async (values: any, actions: FormikHelpers) => { try { if(!contact) { const [,,ship] = props.path.split('/'); values.color = uxToHex(values.color); - await props.api.contacts.share(ship, props.path, us, values) + const sharedValues = Object.assign({}, values); + sharedValues.avatar = (values.avatar === "") ? null : { url: values.avatar }; + console.log(values); + await props.api.contacts.share(ship, props.path, us, sharedValues); actions.setStatus({ success: null }); return; } From bf31deb69821cb4ee2ae12697b08ddf3e041d71e Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Wed, 2 Dec 2020 17:20:01 -0500 Subject: [PATCH 21/38] profile: nickname and avatar surfaced --- pkg/interface/src/views/apps/profile/profile.tsx | 9 +++++++-- .../src/views/landscape/components/ContactCard.tsx | 14 ++++++++++++-- .../views/landscape/components/PopoverRoutes.tsx | 2 ++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/pkg/interface/src/views/apps/profile/profile.tsx b/pkg/interface/src/views/apps/profile/profile.tsx index 672aa74f15..01c14587fc 100644 --- a/pkg/interface/src/views/apps/profile/profile.tsx +++ b/pkg/interface/src/views/apps/profile/profile.tsx @@ -2,7 +2,7 @@ import React from "react"; import { Route, Link, Switch } from "react-router-dom"; import Helmet from 'react-helmet'; -import { Box, Text, Row, Col, Icon } from "@tlon/indigo-react"; +import { Box, Text, Row, Col, Icon, BaseImage } from "@tlon/indigo-react"; import { Sigil } from "~/logic/lib/sigil"; import { uxToHex, MOBILE_BROWSER_REGEX } from "~/logic/lib/util"; @@ -65,6 +65,9 @@ export default function ProfileScreen(props: any) { history.replace("/~profile/identity"); } + const image = (!props?.hideAvatars && contact?.avatar) + ? + : ; return ( - + {image} @@ -129,6 +132,8 @@ export default function ProfileScreen(props: any) { path="/~/default" api={props.api} s3={props.s3} + hideAvatars={props.hideAvatars} + hideNicknames={props.hideNicknames} /> )} diff --git a/pkg/interface/src/views/landscape/components/ContactCard.tsx b/pkg/interface/src/views/landscape/components/ContactCard.tsx index eee9e57a22..5f8bb920c0 100644 --- a/pkg/interface/src/views/landscape/components/ContactCard.tsx +++ b/pkg/interface/src/views/landscape/components/ContactCard.tsx @@ -10,6 +10,7 @@ import { Box, Text, Row, + BaseImage } from "@tlon/indigo-react"; import { Formik, FormikHelpers } from "formik"; import { Contact } from "~/types/contact-update"; @@ -25,6 +26,8 @@ interface ContactCardProps { api: GlobalApi; s3: S3State; rootIdentity: Contact; + hideAvatars: boolean; + hideNicknames: boolean; } const formSchema = Yup.object({ @@ -111,6 +114,11 @@ export function ContactCard(props: ContactCardProps) { }; const hexColor = contact?.color ? `#${uxToHex(contact.color)}` : "#000000"; + const image = (!props?.hideAvatars && contact?.avatar) + ? + : ; + + const nickname = (!props.hideNicknames && contact?.nickname) ? contact.nickname : ""; return ( @@ -132,9 +140,11 @@ export function ContactCard(props: ContactCardProps) { pb={3} alignItems="center" > - + + {image} + - {us} + {nickname} diff --git a/pkg/interface/src/views/landscape/components/PopoverRoutes.tsx b/pkg/interface/src/views/landscape/components/PopoverRoutes.tsx index 9c50487302..1ed935445b 100644 --- a/pkg/interface/src/views/landscape/components/PopoverRoutes.tsx +++ b/pkg/interface/src/views/landscape/components/PopoverRoutes.tsx @@ -144,6 +144,8 @@ export function PopoverRoutes( contact={props.contacts[window.ship]} rootIdentity={props.rootIdentity} api={props.api} + hideAvatars={props.hideAvatars} + hideNicknames={props.hideNicknames} path={props.association["group-path"]} s3={props.s3} /> From fb6488bc682173f7e33277bd11a686cb3250c2f1 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Thu, 3 Dec 2020 13:16:27 -0500 Subject: [PATCH 22/38] interface: bump indigo-react 1.2.5 -> 1.2.15 --- pkg/interface/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/interface/package.json b/pkg/interface/package.json index af7d355078..04b1ba4fb4 100644 --- a/pkg/interface/package.json +++ b/pkg/interface/package.json @@ -9,7 +9,7 @@ "@reach/menu-button": "^0.10.5", "@reach/tabs": "^0.10.5", "@tlon/indigo-light": "^1.0.3", - "@tlon/indigo-react": "1.2.5", + "@tlon/indigo-react": "1.2.15", "@tlon/sigil-js": "^1.4.2", "aws-sdk": "^2.726.0", "big-integer": "^1.6.48", From 275144c72a9c0f5b5a82370a922528bdffe54739 Mon Sep 17 00:00:00 2001 From: Logan Allen Date: Thu, 3 Dec 2020 12:59:21 -0600 Subject: [PATCH 23/38] observe-hook: add %group-on-remove-member thread --- pkg/arvo/app/observe-hook.hoon | 60 ++++++++++++++---------- pkg/arvo/ted/group/on-remove-member.hoon | 23 +++++++++ 2 files changed, 59 insertions(+), 24 deletions(-) create mode 100644 pkg/arvo/ted/group/on-remove-member.hoon diff --git a/pkg/arvo/app/observe-hook.hoon b/pkg/arvo/app/observe-hook.hoon index 9f93de49a1..b298e87a2f 100644 --- a/pkg/arvo/app/observe-hook.hoon +++ b/pkg/arvo/app/observe-hook.hoon @@ -9,14 +9,12 @@ |% +$ card card:agent:gall +$ versioned-state - $% state-0 - state-1 + $% [%0 observers=(map serial observer:sur)] + [%1 observers=(map serial observer:sur)] + [%2 observers=(map serial observer:sur)] == :: +$ serial @uv -+$ state-0 [%0 observers=(map serial observer:sur)] -+$ state-1 [%1 observers=(map serial observer:sur)] -:: ++ got-by-val |= [a=(map serial observer:sur) b=observer:sur] ^- serial @@ -27,7 +25,7 @@ -- :: %- agent:dbug -=| state-1 +=| [%2 observers=(map serial observer:sur)] =* state - :: ^- agent:gall @@ -38,20 +36,16 @@ ++ on-init |^ ^- (quip card _this) :_ this - :~ %+ act - /inv-gra - [%watch %invite-store /invitatory/graph %invite-accepted-graph] - :: - %+ act - /grp-gra - [%watch %group-store /groups %group-on-leave] + :~ (act [%watch %invite-store /invitatory/graph %invite-accepted-graph]) + (act [%watch %group-store /groups %group-on-leave]) + (act [%watch %group-store /groups %group-on-remove-member]) == :: ++ act - |= [=wire =action:sur] + |= =action:sur ^- card :* %pass - wire + /poke %agent [our.bowl %observe-hook] %poke @@ -65,17 +59,35 @@ ++ on-load |= old-vase=vase ^- (quip card _this) + |^ =/ old-state !<(versioned-state old-vase) - ?- -.old-state - %1 `this(state old-state) + =| cards=(list card) + |- + ?: ?=(%2 -.old-state) + [cards this(state old-state)] + ?: ?=(%1 -.old-state) + =. cards + :_ cards + (act [%watch %group-store /groups %group-on-leave]) + $(-.old-state %2) + =. cards + :_ cards + (act [%watch %group-store /groups %group-on-remove-member]) + $(-.old-state %1) :: - %0 - =. state [%1 observers.old-state] - %+ on-poke - %observe-action - !> ^- action:sur - [%watch %group-store /groups %group-on-leave] - == + ++ act + |= =action:sur + ^- card + :* %pass + /poke + %agent + [our.bowl %observe-hook] + %poke + %observe-action + !> ^- action:sur + action + == + -- :: ++ on-poke |= [=mark =vase] diff --git a/pkg/arvo/ted/group/on-remove-member.hoon b/pkg/arvo/ted/group/on-remove-member.hoon new file mode 100644 index 0000000000..3c295353ab --- /dev/null +++ b/pkg/arvo/ted/group/on-remove-member.hoon @@ -0,0 +1,23 @@ +/- spider, grp=group-store +/+ strandio, res=resource +:: +=* strand strand:spider +=* raw-poke raw-poke:strandio +:: +^- thread:spider +|= arg=vase +=/ m (strand ,vase) +^- form:m +=+ !<([=update:grp ~] arg) +?. ?=(%remove-members -.update) + (pure:m !>(~)) +;< =bowl:spider bind:m get-bowl:strandio +?. (~(has in ships.update) our.bowl) + (pure:m !>(~)) +;< ~ bind:m + %+ raw-poke + [our.bowl %group-store] + :- %group-action + !> ^- action:grp + [%remove-group resource.update ~] +(pure:m !>(~)) From 84bec6f7c1dec4da3c5a6fe53937ac3d47b419a1 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Wed, 2 Dec 2020 11:15:21 -0800 Subject: [PATCH 24/38] clay: %pass's %home commits to arvo as %what, unconditionally --- pkg/arvo/sys/vane/clay.hoon | 118 +++++++++--------------------------- 1 file changed, 29 insertions(+), 89 deletions(-) diff --git a/pkg/arvo/sys/vane/clay.hoon b/pkg/arvo/sys/vane/clay.hoon index 08cd76dc67..ed6bf4204f 100644 --- a/pkg/arvo/sys/vane/clay.hoon +++ b/pkg/arvo/sys/vane/clay.hoon @@ -284,7 +284,10 @@ +$ move [p=duct q=(wind note gift:able)] :: local move +$ note :: out request $-> $~ [%b %wait *@da] :: - $% $: %a :: to %ames + $% $: %$ :: to arvo + $>(%what waif) :: + == :: + $: %a :: to %ames $>(%plea task:able:ames) :: == :: $: %b :: to %behn @@ -1394,15 +1397,11 @@ :: promote and fill in ankh :: promote and fill in mime cache :: - =/ sys-changes (need-sys-update changes) - ?: ?& =(%home syd) - !updated - |(!=(~ sys-changes) !=(~ (need-vane-update changes))) - == - (sys-update yoki new-data changes) + ?: &(=(%home syd) !updated) + (sys-update yoki new-data) :: clear caches if zuse reloaded :: - =/ is-zuse-new=? !=(~ sys-changes) + =/ is-zuse-new=? (need-sys-update changes) =. fod.dom ?: is-zuse-new *ford-cache @@ -1642,11 +1641,7 @@ :: ++ path-to-hoon |= [data=(map path (each page lobe)) =path] - (rain path (path-to-cord data path)) - :: - ++ path-to-cord - |= [data=(map path (each page lobe)) =path] - ^- @t + %+ rain path =/ datum (~(got by data) path) ?- -.datum %& (page-to-cord p.datum) @@ -1887,100 +1882,45 @@ :: ++ need-sys-update |= changes=(map path (each page lobe)) - ^- (map path (each page lobe)) - ~+ - ?: =(0 let.dom) - ~ - %- malt - %+ skim ~(tap by changes) + ^- ? + %+ lien ~(tap by changes) |= [=path *] ?| =(/sys/hoon/hoon path) =(/sys/arvo/hoon path) =(/sys/zuse/hoon path) == :: - ++ need-vane-update - |= changes=(map path (each page lobe)) - ^- (map path (each page lobe)) - ~+ - ?: =(0 let.dom) - ~ - %- malt - %+ skim ~(tap by changes) - |= [=path *] - =(/sys/vane (scag 2 path)) - :: :: Delay current update until sys update is complete :: ++ sys-update |= $: =yoki data=(map path (each page lobe)) - changes=(map path (each page lobe)) == ^+ ..park - =/ updates - %- ~(uni by (need-sys-update changes)) - (need-vane-update changes) ?> =(~ pud) =. pud `[syd yoki] |^ %. [hen %slip %c %pork ~] - =< emit - ?: (~(has by updates) /sys/hoon/hoon) - (reset &) - ?: (~(has by updates) /sys/arvo/hoon) - (reset |) - ?: (~(has by updates) /sys/zuse/hoon) - reboot - =/ vanes=(list [=path *]) ~(tap by updates) - |- ^+ ..park - ?~ vanes - ..park - ?. ?=([%sys %vane * %hoon ~] path.i.vanes) - ~& [%strange-sys-update path.i.vanes] - $(vanes t.vanes) - =. ..park (reload i.t.t.path.i.vanes) - $(vanes t.vanes) + emit:(pass-what files) :: - ++ reset - |= new-hoon=? + ++ files + ^- (list (pair path (cask))) + %+ murn + ~(tap by data) + |= [pax=path dat=(each page lobe)] + ^- (unit (pair path (cask))) + =/ xap (flop pax) + ?> ?=(^ xap) + ?. ?=(%hoon i.xap) ~ + :^ ~ (flop t.xap) %hoon + ?- -.dat + %& (page-to-cord p.dat) + %| (lobe-to-cord p.dat) + == + :: + ++ pass-what + |= fil=(list (pair path (cask))) ^+ ..park - ?. new-hoon - =/ arvo=@t (path-to-cord data /sys/arvo/hoon) - =. ..park (pass-lyra hoon=~ arvo) - reboot - =/ hoon=@t (path-to-cord data /sys/hoon/hoon) - =/ arvo=@t (path-to-cord data /sys/arvo/hoon) - =. ..park (pass-lyra `hoon arvo) - reboot - :: - ++ pass-lyra - |= [hoon=(unit @t) arvo=@t] - ^+ ..park - (emit hen %pass /reset %d %flog %lyra hoon arvo) - :: - ++ reboot - =/ zuse=@t (path-to-cord data /sys/zuse/hoon) - =. ..park - %- emit - [hen %pass /reboot %d %flog %veer %$ /sys/zuse/hoon zuse] - reload-all - :: - ++ reload-all - =/ vanes=(list term) - ~[%ames %behn %clay %dill %eyre %gall %iris %jael] - |- ^+ ..park - ?~ vanes - ..park - =. ..park (reload i.vanes) - $(vanes t.vanes) - :: - ++ reload - |= =term - =/ vane=@t (path-to-cord data /sys/vane/[term]/hoon) - %- emit - =/ tip (end 3 term) - =/ =path /sys/vane/[term]/hoon - [hen %pass /reload %d %flog %veer tip path vane] + (emit hen %pass /what %$ what/fil) -- -- :: From 0cc8c450a8bfef49b85b5d9b4d66b97e544c0320 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Wed, 2 Dec 2020 11:35:29 -0800 Subject: [PATCH 25/38] arvo: removes %lyra and %veer --- pkg/arvo/gen/hood/reboot.hoon | 13 --------- pkg/arvo/gen/hood/reload-desk.hoon | 14 ---------- pkg/arvo/gen/hood/reload.hoon | 14 ---------- pkg/arvo/gen/hood/reset.hoon | 13 --------- pkg/arvo/gen/reload-event.hoon | 26 ------------------ pkg/arvo/lib/hood/helm.hoon | 44 ------------------------------ pkg/arvo/lib/pill.hoon | 23 ---------------- pkg/arvo/sys/arvo.hoon | 22 ++------------- pkg/arvo/sys/vane/dill.hoon | 4 --- pkg/arvo/sys/zuse.hoon | 6 ---- 10 files changed, 3 insertions(+), 176 deletions(-) delete mode 100644 pkg/arvo/gen/hood/reboot.hoon delete mode 100644 pkg/arvo/gen/hood/reload-desk.hoon delete mode 100644 pkg/arvo/gen/hood/reload.hoon delete mode 100644 pkg/arvo/gen/hood/reset.hoon delete mode 100644 pkg/arvo/gen/reload-event.hoon diff --git a/pkg/arvo/gen/hood/reboot.hoon b/pkg/arvo/gen/hood/reboot.hoon deleted file mode 100644 index aa48d85cb3..0000000000 --- a/pkg/arvo/gen/hood/reboot.hoon +++ /dev/null @@ -1,13 +0,0 @@ -:: Helm: Reload %zuse and all vanes -:: -:::: /hoon/reboot/hood/gen - :: -/? 310 -:: -:::: - :: -:- %say -|= $: [now=@da eny=@uvJ bec=beak] - [arg=~ ~] - == -[%helm-reload ~[%z %a %b %c %d %e %g %i %j]] diff --git a/pkg/arvo/gen/hood/reload-desk.hoon b/pkg/arvo/gen/hood/reload-desk.hoon deleted file mode 100644 index c242a2da17..0000000000 --- a/pkg/arvo/gen/hood/reload-desk.hoon +++ /dev/null @@ -1,14 +0,0 @@ -:: Helm: Reload vane/s from desk -:: -:::: /hoon/reload-desk/hood/gen - :: -/? 310 -:: -:::: - :: -:- %say -|= $: [now=@da eny=@uvJ bec=beak] - [arg=[desk (list term)] ~] - == -:- %helm-reload-desk -arg diff --git a/pkg/arvo/gen/hood/reload.hoon b/pkg/arvo/gen/hood/reload.hoon deleted file mode 100644 index d22ea1b523..0000000000 --- a/pkg/arvo/gen/hood/reload.hoon +++ /dev/null @@ -1,14 +0,0 @@ -:: Helm: Reload vane/s -:: -:::: /hoon/reload/hood/gen - :: -/? 310 -:: -:::: - :: -:- %say -|= $: [now=@da eny=@uvJ bec=beak] - [arg=(list term) ~] - == -:- %helm-reload -arg diff --git a/pkg/arvo/gen/hood/reset.hoon b/pkg/arvo/gen/hood/reset.hoon deleted file mode 100644 index 0e15ce59fa..0000000000 --- a/pkg/arvo/gen/hood/reset.hoon +++ /dev/null @@ -1,13 +0,0 @@ -:: Helm: Reload hoon/hoon and all vanes -:: -:::: /hoon/reset/hood/gen - :: -/? 310 -:: -:::: - :: -:- %say -|= $: [now=@da eny=@uvJ bec=beak] - [arg=~ ~] - == -[%helm-reset ~] diff --git a/pkg/arvo/gen/reload-event.hoon b/pkg/arvo/gen/reload-event.hoon deleted file mode 100644 index 5d87775f6b..0000000000 --- a/pkg/arvo/gen/reload-event.hoon +++ /dev/null @@ -1,26 +0,0 @@ -:: Produce a raw event to reload a vane -:: -:: Try: .event/ovo +reload-event %c, then restart urbit with -:: -I pier/.urb/put/event.ovo -:: -:- %say -|= $: [now=@da eny=@uvJ bek=beak] - [[tam=term ~] ~] - == -:- %ovo -=/ top `path`/(scot %p p.bek)/[q.bek]/(scot r.bek) -=/ nam - =/ van=(list [term ~]) - :- zus=[%zuse ~] - ~(tap by dir:.^(arch %cy (welp top /sys/vane))) - ?. =(1 (met 3 tam)) - tam - =/ zaz=(list [p=knot ~]) - (skim van |=([a=term ~] =(tam (end 3 a)))) - ?> ?=([[@ ~] ~] zaz) - `term`p.i.zaz -=/ tip (end 3 nam) -=/ bip ?:(=('z' tip) %$ tip) -=/ way ?:(=('z' tip) (welp top /sys/[nam]) (welp top /sys/vane/[nam])) -=/ fil .^(@ %cx (welp way /hoon)) -[//arvo %veer bip way fil] diff --git a/pkg/arvo/lib/hood/helm.hoon b/pkg/arvo/lib/hood/helm.hoon index 8dd29c03de..336b066f08 100644 --- a/pkg/arvo/lib/hood/helm.hoon +++ b/pkg/arvo/lib/hood/helm.hoon @@ -154,47 +154,6 @@ ?> ?=([@t ~] pax) (flog %text "hi {(trip i.pax)} {?~(cop "" "un")}successful") :: -++ poke-reload |=(all=(list term) (poke-reload-desk %home all)) -++ poke-reload-desk :: reload vanes - |: $:,[syd=desk all=(list term)] =< abet - %- emil - %+ turn all - =+ top=`path`/(scot %p our.bowl)/[syd]/(scot %da now.bowl) - =/ van=(list [term ~]) - :- zus=[%zuse ~] - ~(tap by dir:.^(arch %cy (welp top /sys/vane))) - |= nam=@tas - =. nam - ?. =(1 (met 3 nam)) - nam - =/ zaz=(list [p=knot ~]) - (skim van |=([a=term ~] =(nam (end 3 a)))) - ?> ?=([[@ ~] ~] zaz) - `term`p.i.zaz - =+ tip=(end 3 nam) - =+ zus==('z' tip) - =+ way=?:(zus (welp top /sys/[nam]) (welp top /sys/vane/[nam])) - =+ fil=.^(@ %cx (welp way /hoon)) - [%pass /reload %arvo %d %flog %veer ?:(=('z' tip) %$ tip) way fil] -:: +poke-reset: send %lyra to initiate kernel upgrade -:: -:: And reinstall %zuse and the vanes with %veer. -:: Trigger with |reset. -:: -++ poke-reset - |= hood-reset=~ - =< abet - %- emil - ^- (list card:agent:gall) - =/ top=path /(scot %p our.bowl)/home/(scot %da now.bowl)/sys - =/ hun .^(@t %cx (welp top /hoon/hoon)) - =/ arv .^(@t %cx (welp top /arvo/hoon)) - ~! *task:able:dill - :- [%pass /reset %arvo %d %flog %lyra `hun arv] - %+ turn - (module-ova:pill top) - |=([=wire =flog:dill] [%pass wire %arvo %d %flog flog]) -:: ++ poke-trim |= pri=@ud =< abet (emit %pass /pack %arvo %d %flog %crop pri) @@ -253,9 +212,6 @@ %helm-pack =;(f (f !<(_+<.f vase)) poke-pack) %helm-pass =;(f (f !<(_+<.f vase)) poke-pass) %helm-rekey =;(f (f !<(_+<.f vase)) poke-rekey) - %helm-reload =;(f (f !<(_+<.f vase)) poke-reload) - %helm-reload-desk =;(f (f !<(_+<.f vase)) poke-reload-desk) - %helm-reset =;(f (f !<(_+<.f vase)) poke-reset) %helm-send-hi =;(f (f !<(_+<.f vase)) poke-send-hi) %helm-serve =;(f (f !<(_+<.f vase)) poke-serve) %helm-trim =;(f (f !<(_+<.f vase)) poke-trim) diff --git a/pkg/arvo/lib/pill.hoon b/pkg/arvo/lib/pill.hoon index 634310db70..9b683af396 100644 --- a/pkg/arvo/lib/pill.hoon +++ b/pkg/arvo/lib/pill.hoon @@ -17,29 +17,6 @@ [%boot ? $%($>(%fake task:able:jael) $>(%dawn task:able:jael))] unix-task == -:: +module-ova: vane load operations -:: -:: sys: full path to /sys directory -:: -++ module-ova - |= sys=path - ^- (list [wire [%veer term path cord]]) - %+ turn - ^- (list (pair term path)) - :~ [%$ /zuse] :: standard library - [%a /vane/ames] :: network - [%b /vane/behn] :: timer - [%c /vane/clay] :: revision control - [%d /vane/dill] :: console - [%e /vane/eyre] :: http server - [%g /vane/gall] :: applications - [%i /vane/iris] :: http client - [%j /vane/jael] :: identity and security - == - |= [=term =path] - =/ pax (weld sys path) - =/ txt .^(@ %cx (weld pax /hoon)) - [[%vane path] [%veer term pax txt]] :: +file-ovum: userspace filesystem load :: :: bas: full path to / directory diff --git a/pkg/arvo/sys/arvo.hoon b/pkg/arvo/sys/arvo.hoon index e4583e64da..d72ae5a335 100644 --- a/pkg/arvo/sys/arvo.hoon +++ b/pkg/arvo/sys/arvo.hoon @@ -271,21 +271,17 @@ == :: +$ waif - :: %lyra: upgrade kernel :: %trim: trim state, spam to all :: %vega: notify vanes post upgrade :: %what: update from files :: %whey: produce $mass :: XX remove, scry :: %verb: toggle laconicity - :: %veer: upgrade module :: - $% [%lyra hun=(unit @t) van=@t] - [%trim p=@ud] + $% [%trim p=@ud] [%vega ~] [%what p=(list (pair path (cask)))] [%whey ~] [%verb p=(unit ?)] - [%veer lal=@tas pax=path txt=@t] == +$ wasp :: %crud: reroute $ovum with $goof @@ -297,7 +293,7 @@ [%wyrd p=vere] == +$ wisp - $% $>(?(%verb %veer %what) waif) + $% $>(?(%verb %what) waif) $>(?(%wack %wyrd) wasp) [%whom p=ship] == @@ -1239,10 +1235,6 @@ ^+ ..pith ?^ dud ~>(%mean.'pith: goof' !!) ?- -.waif - %lyra =; wat $(waif wat) - :+ %what [/sys/arvo hoon/van.waif] - ?~ hun.waif ~ - [[/sys/hoon hoon/u.hun.waif] ~] :: :: %trim: clear state :: @@ -1255,10 +1247,6 @@ :: %vega (emit $/~ (spam /arvo !>(waif))) :: XX also out %verb ..pith(lac.fad ?~(p.waif !lac.fad u.p.waif)) - :: - %veer =/ pax - sys/?:(?=(%$ lal.waif) /zuse /vane/[(grow lal.waif)]) - $(waif what/[[pax hoon/txt.waif] ~]) :: %what ~(kel what p.waif) %whey ..pith(out [[//arvo mass/whey] out]) @@ -1331,7 +1319,7 @@ ^+ this :: XX update clients to %pass to arvo, remove :: - ?: ?=(?(%lyra %veer %verb %whey) -.card.ovum) + ?: ?=(?(%verb %whey) -.card.ovum) %- call ~> %mean.'xeno: bad waif' ;;(waif:pith card.ovum) @@ -1639,10 +1627,6 @@ |- ^+ ..poke ?- -.wip %verb ..poke(lac ?~(p.wip !lac u.p.wip)) - :: - %veer =/ pax - sys/?:(?=(%$ lal.wip) /zuse /vane/[(grow lal.wip)]) - $(q.ovo what/[[pax hoon/txt.wip] ~]) :: %wack ..poke(eny `p.wip) :: diff --git a/pkg/arvo/sys/vane/dill.hoon b/pkg/arvo/sys/vane/dill.hoon index 00feb64f6c..63351f0dac 100644 --- a/pkg/arvo/sys/vane/dill.hoon +++ b/pkg/arvo/sys/vane/dill.hoon @@ -44,9 +44,7 @@ $> $? %crud :: %heft :: %init :: XX obsolete? - %lyra :: %text :: - %veer :: %verb :: == :: task:able:dill :: @@ -118,11 +116,9 @@ (crud p.kyz q.kyz) %blew (send %rez p.p.kyz q.p.kyz) %heft (dump %whey ~) - %lyra (dump kyz) %meld (dump kyz) %pack (dump kyz) %crop (dump trim+p.kyz) - %veer (dump kyz) %verb (dump kyz) == :: diff --git a/pkg/arvo/sys/zuse.hoon b/pkg/arvo/sys/zuse.hoon index 1e1f30d8de..64225ba6d9 100644 --- a/pkg/arvo/sys/zuse.hoon +++ b/pkg/arvo/sys/zuse.hoon @@ -1098,11 +1098,9 @@ [%burl p=@t] :: activate url [%init p=@p] :: set owner [%logo ~] :: logout - [%lyra hoon=(unit @t) arvo=@t] :: upgrade kernel [%meld ~] :: unify memory [%pack ~] :: compact memory [%trim p=@ud] :: trim kernel state - [%veer p=@ta q=path r=@t] :: install vane [%verb ~] :: verbose mode [%whey ~] :: memory report == :: @@ -1121,13 +1119,11 @@ [%hook ~] :: this term hung up [%harm ~] :: all terms hung up $>(%init vane-task) :: after gall ready - [%lyra hoon=(unit @t) arvo=@t] :: upgrade kernel [%meld ~] :: unify memory [%noop ~] :: no operation [%pack ~] :: compact memory [%talk p=tank] :: [%text p=tape] :: - [%veer p=@ta q=path r=@t] :: install vane [%view session=~] :: watch session blits $>(%trim vane-task) :: trim state $>(%vega vane-task) :: report upgrade @@ -1190,11 +1186,9 @@ $% [%crop p=@ud] :: trim kernel state [%crud p=@tas q=(list tank)] :: [%heft ~] :: - [%lyra hoon=(unit @t) arvo=@t] :: upgrade kernel [%meld ~] :: unify memory [%pack ~] :: compact memory [%text p=tape] :: - [%veer p=@ta q=path r=@t] :: install vane [%verb ~] :: verbose mode == :: -- ::dill From a773ff408dfed28611e6e7ca1047f95865956261 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Wed, 2 Dec 2020 12:01:55 -0800 Subject: [PATCH 26/38] arvo: updates %dill to %pass %verb/%whey, removes %give to arvo --- pkg/arvo/sys/arvo.hoon | 10 ---------- pkg/arvo/sys/vane/dill.hoon | 9 ++++++--- pkg/arvo/sys/zuse.hoon | 2 -- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/pkg/arvo/sys/arvo.hoon b/pkg/arvo/sys/arvo.hoon index d72ae5a335..23b90c2139 100644 --- a/pkg/arvo/sys/arvo.hoon +++ b/pkg/arvo/sys/arvo.hoon @@ -1317,16 +1317,6 @@ ++ xeno |= =ovum ^+ this - :: XX update clients to %pass to arvo, remove - :: - ?: ?=(?(%verb %whey) -.card.ovum) - %- call - ~> %mean.'xeno: bad waif' - ;;(waif:pith card.ovum) - :: - :: XX uncomment to restore previous routing - :: - :: =. wire.ovum $/wire.ovum this(out [ovum out]) -- -- diff --git a/pkg/arvo/sys/vane/dill.hoon b/pkg/arvo/sys/vane/dill.hoon index 63351f0dac..45756adf6f 100644 --- a/pkg/arvo/sys/vane/dill.hoon +++ b/pkg/arvo/sys/vane/dill.hoon @@ -33,7 +33,10 @@ +$ move [p=duct q=(wind note gift:able)] :: local move +$ note :: out request $-> $~ [%d %verb ~] :: - $% $: %c :: + $% $: %$ :: + $>(?(%verb %whey) waif) :: + == :: + $: %c :: $> $? %merg :: merge desks %perm :: change permissions %warp :: wait for clay hack @@ -115,11 +118,11 @@ %crud :: (send `dill-belt`[%cru p.kyz q.kyz]) (crud p.kyz q.kyz) %blew (send %rez p.p.kyz q.p.kyz) - %heft (dump %whey ~) + %heft (pass /whey %$ whey/~) %meld (dump kyz) %pack (dump kyz) %crop (dump trim+p.kyz) - %verb (dump kyz) + %verb (pass /verb %$ kyz) == :: ++ crud diff --git a/pkg/arvo/sys/zuse.hoon b/pkg/arvo/sys/zuse.hoon index 64225ba6d9..8abf6004d3 100644 --- a/pkg/arvo/sys/zuse.hoon +++ b/pkg/arvo/sys/zuse.hoon @@ -1101,8 +1101,6 @@ [%meld ~] :: unify memory [%pack ~] :: compact memory [%trim p=@ud] :: trim kernel state - [%verb ~] :: verbose mode - [%whey ~] :: memory report == :: +$ task :: in request ->$ $~ [%vega ~] :: From 862fa14823bd3397c566f0981cc218e501f39b2a Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Wed, 2 Dec 2020 13:52:49 -0800 Subject: [PATCH 27/38] arvo: removes $curd, moves $card and $ovum to top level --- pkg/arvo/sys/arvo.hoon | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/pkg/arvo/sys/arvo.hoon b/pkg/arvo/sys/arvo.hoon index 23b90c2139..0cb7784206 100644 --- a/pkg/arvo/sys/arvo.hoon +++ b/pkg/arvo/sys/arvo.hoon @@ -88,7 +88,7 @@ +| %interface :: :: $ball: dynamic kernel action -:: $curd: tagged, untyped event +:: $card: tagged, untyped event :: $duct: causal history :: +hobo: %soft task builder :: $goof: crash label and trace XX fail/ruin/crud/flaw/lack/miss @@ -108,7 +108,7 @@ :: +wite: kernel action/error builder :: +$ ball (wite [vane=term task=maze] maze) -+$ curd (cask) ++$ card (cask) +$ duct (list wire) ++ hobo |$ [a] @@ -121,7 +121,7 @@ (pair cord (each * (list mass))) +$ monk (each ship (pair @tas @ta)) +$ move [=duct =ball] -+$ ovum (pair wire curd) ++$ ovum [=wire =card] :: +$ roof (room vase) :: namespace +$ rook (room meta) :: meta-namespace @@ -490,11 +490,8 @@ :: $hoof: hoon source :: $news: collated updates :: $oped: module updates + :: $seed: next kernel source :: - :: XX replace top-level structures - :: - +$ card (cask) - +$ ovum [=wire =card] +$ hoof @t +$ news $: :: sys: installs + replacements @@ -1273,7 +1270,7 @@ ?~ wire.ovum ~>(%mean.'pith: bad wire' !!) :: - ?. ?=(?(%crud %wack %wyrd) -.card.ovum) + ?. ?=(?(%crud %wack %wyrd) p.card.ovum) (emit $/~ [*duct (gest ovum)] ~) :: =/ buz ~> %mean.'pith: bad wasp' @@ -1537,7 +1534,7 @@ now.sol now == :: - ~| poke+-.q.ovo + ~| poke/p.card.ovo =/ zef=(each (pair (list ovum) soul) (trap ^)) loop:(~(poke le:part [pit vil] sol) ovo) ?- -.zef @@ -1609,9 +1606,9 @@ |= [now=@da ovo=ovum] ^- ^ =/ wip - ~| [p.ovo p.q.ovo] + ~| poke/p.card.ovo ~> %mean.'arvo: bad wisp' - ;;(wisp q.ovo) + ;;(wisp card.ovo) :: =. ..poke |- ^+ ..poke From 83bd3943a8e61069bd95b6f2587a8bb2ace1212e Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Wed, 2 Dec 2020 16:16:59 -0800 Subject: [PATCH 28/38] arvo: adds %lull, vane structures --- pkg/arvo/gen/ivory.hoon | 1 + pkg/arvo/sys/arvo.hoon | 143 ++++++++++++++++++++++-------------- pkg/arvo/sys/lull.hoon | 4 + pkg/arvo/sys/vane/clay.hoon | 137 +++++++++++++++------------------- pkg/arvo/sys/zuse.hoon | 2 +- pkg/urbit/include/c/motes.h | 1 + pkg/urbit/vere/pier.c | 2 +- 7 files changed, 157 insertions(+), 133 deletions(-) create mode 100644 pkg/arvo/sys/lull.hoon diff --git a/pkg/arvo/gen/ivory.hoon b/pkg/arvo/gen/ivory.hoon index c85587d3fc..858a6d975b 100644 --- a/pkg/arvo/gen/ivory.hoon +++ b/pkg/arvo/gen/ivory.hoon @@ -56,6 +56,7 @@ %what [/sys/hoon hoon/compiler-source] [/sys/arvo hoon/arvo-source] + [/sys/lull hoon/.^(@ %cx (weld sys /lull/hoon))] [/sys/zuse hoon/.^(@ %cx (weld sys /zuse/hoon))] == :: installed: Arvo gate (formal instance) with %zuse installed diff --git a/pkg/arvo/sys/arvo.hoon b/pkg/arvo/sys/arvo.hoon index 0cb7784206..52e02239df 100644 --- a/pkg/arvo/sys/arvo.hoon +++ b/pkg/arvo/sys/arvo.hoon @@ -18,6 +18,7 @@ :::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::: :::::: volume 3, Arvo models and skeleton :::::: :::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::: +=> ..ride => |% +| %global @@ -212,14 +213,20 @@ +$ grub $: :: who: identity once we know it :: eny: entropy once we learn it - :: bod: %zuse once we receive it + :: lac: laconicity as we want it + :: ver: the Outside as we see it + :: fat: source when we attain it + :: lul: %lull when we acquire it + :: zus: %zuse once we receive it + :: van: vanes while we desire it :: who=(unit ship) eny=(unit @) lac=? ver=(unit vere) fat=(unit (axal (cask))) - bod=(unit (trap vase)) + lul=(unit (trap vase)) + zus=(unit (trap vase)) van=(map term (trap vase)) == +$ heir @@ -248,10 +255,12 @@ == $= mod $: :: fat: filesystem + :: lul: %lull :: zus: %zuse :: van: vanes :: fat=(axal (cask)) + lul=vase zus=vase van=(map term vane) == @@ -501,7 +510,8 @@ use=(map path (cask)) == +$ oped - $: zus=(unit hoof) + $: lul=(unit hoof) + zus=(unit hoof) van=(list (cask hoof)) == +$ seed [hun=(unit hoof) arv=hoof] @@ -588,8 +598,20 @@ ++ adorn |= [del=news all=?] ^- (pair oped _fat) + :: lull: shared structures + :: + =^ lul fat + ?^ hav=(~(get by sys.del) /sys/lull) + :- `(sole u.hav) + (~(put de fat) /sys/lull u.hav) + :_ fat + ~| %adorn-no-lull + ?.(all ~ `(sole (need fil:(~(get de fat) /sys/lull)))) :: zuse: shared library :: + :: %lull is the subject of %zuse; force all if we have a new %lull + :: + =. all |(all ?=(^ lul)) =^ zus fat ?^ hav=(~(get by sys.del) /sys/zuse) :- `(sole u.hav) @@ -601,8 +623,9 @@ :: :: %zuse is the subject of the vanes; force all if we have a new %zuse :: + =. all |(all ?=(^ zus)) =| nav=(map term hoof) - =? nav |(all ?=(^ zus)) + =? nav all %- ~(gas by nav) %+ turn ~(tap by dir:(~(get de fat) /sys/vane)) @@ -621,7 +644,7 @@ [[`@tas`nam (sole q)] (~(put de taf) p q)] :: =; van - [[zus van] fat] + [[lul zus van] fat] %+ sort ~(tap by (~(gas by nav) new)) |=([[a=@tas *] [b=@tas *]] (aor a b)) -- :: adapt @@ -1211,9 +1234,14 @@ |= [del=news all=?] ^+ ..pith =^ job=oped fat.mod.sol (~(adorn adapt fat.mod.sol) del all) + =? lul.mod.sol ?=(^ lul.job) + $:(smit:va "lull" pit /sys/lull/hoon u.lul.job) =? zus.mod.sol ?=(^ zus.job) - $:(smit:va "zuse" pit /sys/zuse/hoon u.zus.job) - %- (wyrd kel.ver.zen [zuse/;;(@ud q:(slap zus.mod.sol limb/%zuse)) ~]) + $:(smit:va "zuse" lul.mod.sol /sys/zuse/hoon u.zus.job) + %- %+ wyrd kel.ver.zen + :~ lull/;;(@ud q:(slap lul.mod.sol limb/%lull)) + zuse/;;(@ud q:(slap zus.mod.sol limb/%zuse)) + == %= ..pith van.mod %+ roll van.job @@ -1297,7 +1325,8 @@ ^- (list (pair term @)) :~ hoon/hoon-version arvo/arvo - zuse/;;(@ q:(slap zus.mod limb/%zuse)) + lull/;;(@ud q:(slap lul.mod limb/%lull)) + zuse/;;(@ud q:(slap zus.mod limb/%zuse)) == =? lag.zen !=(rev.ver.zen rev.p.buz) ~&(%unlagging |) ..pith(ver.zen p.buz) @@ -1485,7 +1514,8 @@ ^- (list (pair term @)) :~ hoon/hoon-version arvo/arvo - zuse/;;(@ q:(slap zus.mod limb/%zuse)) + lull/;;(@ud q:(slap lul.mod limb/%lull)) + zuse/;;(@ud q:(slap zus.mod limb/%zuse)) == :: restore working state and resume :: @@ -1562,28 +1592,59 @@ :: with +wish and vane installation with the %veer event. :: => |% - ++ mint - |= [vax=vase lal=term pax=path txt=@t] - ^- (trap vase) - =/ cap ?:(?=(%$ lal) "zuse" "vane {}") - (smit:va:part cap vax pax txt) - :: ++ molt |= [now=@da grub] ^- (unit heir) - ?. &(?=(^ who) ?=(^ eny) ?=(^ ver) ?=(^ fat) ?=(^ bod)) + ?. &(?=(^ who) ?=(^ eny) ?=(^ ver) ?=(^ fat) ?=(^ lul) ?=(^ zus)) ~ - =/ zus $:u.bod + =/ lul $:u.lul + =/ zus $:u.zus %- %+ wyrd kel.u.ver ^- (list (pair term @)) :~ hoon/hoon-version arvo/arvo + lull/;;(@ud q:(slap lul limb/%lull)) zuse/;;(@ud q:(slap zus limb/%zuse)) == =/ nav %- ~(run by van) |=(a=(trap vase) (settle:va:part (slym $:a zus))) :^ ~ arvo *debt - [[u.who now u.eny] [lac] [u.ver |] u.fat zus nav] + [[u.who now u.eny] [lac] [u.ver |] u.fat lul zus nav] + :: + ++ what + |= [grub fil=(list (pair path (cask)))] + ^- grub + =* gub +<- + =/ taf (fall fat *(axal (cask))) + =/ del (~(group adapt:part taf) fil) + =/ tub (~(usurp adapt:part taf) del) + ?: &(?=(^ dir.taf) ?=(^ tub)) + ~>(%mean.'arvo: larval reboot' !!) :: XX support + :: + :: require, and unconditionally adopt, initial kernel source + :: + =? taf =(~ dir.taf) :: XX TMI + ~| %larval-need-kernel + ?> &(?=(^ tub) ?=(^ hun.p.u.tub)) + (~(gas de taf) q.u.tub) + :: + =^ job=oped:part taf (~(adorn adapt:part taf) del |) + =? lul ?=(^ lul.job) + `(smit:va:part "lull" pit /sys/lull/hoon u.lul.job) + =? zus ?=(^ zus.job) + ?. ?=(^ lul) + ~|(%larval-need-lull !!) + `(smit:va:part "zuse" $:u.lul /sys/zuse/hoon u.zus.job) + =? van !=(~ van.job) :: XX TMI + ?. ?=(^ zus) + ~|(%larval-need-zuse !!) + %+ roll van.job + |= [[(cask hoof:part)] =_van] + ^+ van + =/ way (wilt p) + %+ ~(put by van) way + (smit:va:part "vane {}" $:u.zus /sys/vane/[p]/hoon q) + gub(fat `taf) -- :: :: larval state, as a discriminable sample @@ -1605,66 +1666,38 @@ ++ poke :: +47 |= [now=@da ovo=ovum] ^- ^ + ~| poke/p.card.ovo =/ wip - ~| poke/p.card.ovo ~> %mean.'arvo: bad wisp' ;;(wisp card.ovo) :: =. ..poke - |- ^+ ..poke ?- -.wip %verb ..poke(lac ?~(p.wip !lac u.p.wip)) - :: %wack ..poke(eny `p.wip) - :: - %what =/ taf (fall fat *(axal (cask))) - =/ del (~(group adapt:part taf) p.wip) - =/ tub (~(usurp adapt:part taf) del) - ?: &(?=(^ dir.taf) ?=(^ tub)) - ~>(%mean.'arvo: larval reboot' !!) :: XX support - :: - :: require, and unconditionally adopt, initial kernel source - :: - =? taf =(~ dir.taf) :: XX TMI - ~| %larval-need-kernel - ?> &(?=(^ tub) ?=(^ hun.p.u.tub)) - (~(gas de taf) q.u.tub) - :: - =^ job taf [p q]:(~(adorn adapt:part taf) del |) - =? bod ?=(^ zus.job) - `(mint pit %$ /sys/zuse/hoon u.zus.job) - %= ..poke - fat `taf - van - %+ roll van.job - |= [[(cask hoof:part)] =_van] - ^+ van - ?> ?=(^ bod) - =/ way (wilt p) - (~(put by van) way (mint $:u.bod way /sys/vane/[p]/hoon q)) - == - :: + %what ..poke(gub (what gub p.wip)) %whom ..poke(who ~|(%whom-once ?>(?=(~ who) `p.wip))) :: %wyrd %- %+ wyrd kel.p.wip ^- (list (pair term @)) :* hoon/hoon-version arvo/arvo - ?~ bod ~ - [zuse/;;(@ud q:(slap $:u.bod limb/%zuse)) ~] + ?~ lul ~ + :- lull/;;(@ud q:(slap $:u.lul limb/%lull)) + ?~ zus ~ + [zuse/;;(@ud q:(slap $:u.zus limb/%zuse)) ~] == ..poke(ver `p.wip) == :: - ?~ hir=(molt now gub) - [~ ..poke] - :: :: upgrade once we've accumulated necessary state :: + ?~ hir=(molt now gub) + [~ ..poke] ~> %slog.[0 leaf+"arvo: metamorphosis"] (load u.hir) :: ++ wish :: +22 |= txt=* - q:(slap ?~(bod pit $:u.bod) (ream ;;(@t txt))) + q:(slap ?~(zus pit $:u.zus) (ream ;;(@t txt))) -- diff --git a/pkg/arvo/sys/lull.hoon b/pkg/arvo/sys/lull.hoon new file mode 100644 index 0000000000..ea8effd8c5 --- /dev/null +++ b/pkg/arvo/sys/lull.hoon @@ -0,0 +1,4 @@ +=> ..is +|% +++ lull %lull-kelvin +-- diff --git a/pkg/arvo/sys/vane/clay.hoon b/pkg/arvo/sys/vane/clay.hoon index ed6bf4204f..148fdfd6f3 100644 --- a/pkg/arvo/sys/vane/clay.hoon +++ b/pkg/arvo/sys/vane/clay.hoon @@ -127,6 +127,7 @@ +$ reef-cache $: hoon=vase arvo=vase + lull=vase zuse=vase == :: @@ -1401,7 +1402,7 @@ (sys-update yoki new-data) :: clear caches if zuse reloaded :: - =/ is-zuse-new=? (need-sys-update changes) + =/ is-zuse-new=? (need-reef-update changes) =. fod.dom ?: is-zuse-new *ford-cache @@ -1546,89 +1547,68 @@ (~(put by $(builds t.builds)) i.builds) :: ++ build-reef + => |% + +$ reef-step + :: vary: source or dependencies changed + :: deep: source and dependencies match kernel + :: + [vary=? deep=?] + -- + :: |= $: fer=(unit reef-cache) invalid=(set path) data=(map path (each page lobe)) == - ^- reef-cache - ?: =(%home syd) - [!>(..ride) !>(..is) !>(..zuse)] - |^ - ?: |(?=(~ fer) (~(has in invalid) /sys/hoon/hoon)) - =/ [home=? hoon=vase] - ?: (same-as-home /sys/hoon/hoon) - &+!>(..ride) - |+build-hoon - :- hoon - =/ [home=? arvo=vase] - ?: &(home (same-as-home /sys/arvo/hoon)) - &+!>(..is) - |+(build-arvo hoon) - :- arvo - ?: &(home (same-as-home /sys/zuse/hoon)) - !>(..zuse) - (build-zuse arvo) - :- hoon.u.fer - ?: (~(has in invalid) /sys/arvo/hoon) - =/ [home=? arvo=vase] - ?: &((same-as-home /sys/hoon/hoon) (same-as-home /sys/arvo/hoon)) - &+!>(..is) - |+(build-arvo hoon.u.fer) - :- arvo - ?: &(home (same-as-home /sys/zuse/hoon)) - !>(..zuse) - (build-zuse arvo) - :- arvo.u.fer - ?: (~(has in invalid) /sys/zuse/hoon) - ?: ?& (same-as-home /sys/hoon/hoon) - (same-as-home /sys/arvo/hoon) - (same-as-home /sys/zuse/hoon) + |^ ^- reef-cache + =/ [tep=reef-step ref=reef-cache] + ?^ fer + [[vary=| deep=&] u.fer] + [[vary=& deep=&] *reef-cache] + :: + =^ hon tep (build tep /sys/hoon hoon.ref !>(**) !,(*hoon ..ride)) + =^ rav tep (build tep /sys/arvo arvo.ref hon !,(*hoon ..part)) + =^ lul tep (build tep /sys/lull lull.ref rav !,(*hoon .)) + =^ zus tep (build tep /sys/zuse zuse.ref rav !,(*hoon .)) + [hon rav lul zus] + :: + ++ build + |= [tep=reef-step pax=path pre=vase sub=vase pro=hoon] + ^- (pair vase reef-step) + =/ ful (weld pax /hoon) + ?. ?| vary.tep + (~(has in invalid) ful) == - !>(..zuse) - (build-zuse arvo.u.fer) - zuse.u.fer - :: - ++ build-hoon - %- road |. - ~> %slog.0^leaf+"clay: building hoon on {}" + [pre tep] + =. vary.tep & + =/ src (path-to-cord data ful) + :: + ?: &(deep.tep (deep pax src)) + [(slap !>(..zuse) pro) tep] + :: + =/ nam=term ?.(?=([@ta @ta *] pax) %$ i.t.pax) + ~> %slog.0^leaf+"clay: building %{(trip nam)} on %{(trip syd)}" =/ gen - ~> %mean.%hoon-parse-fail - (path-to-hoon data /sys/hoon/hoon) - ~> %mean.%hoon-compile-fail - (slot 7 (slap !>(0) gen)) + ~_ leaf+"%{(trip nam)}-parse-fail" + (rain ful src) + ~_ leaf+"%{(trip nam)}-compile-fail" + [(slap (slap sub gen) pro) tep(deep |)] :: - ++ build-arvo - |= hoon=vase - %- road |. - ~> %slog.0^leaf+"clay: building arvo on {}" - =/ gen - ~> %mean.%arvo-parse-fail - (path-to-hoon data /sys/arvo/hoon) - ~> %mean.%arvo-compile-fail - (slap (slap hoon gen) !,(*^hoon ..is)) - :: - ++ build-zuse - |= arvo=vase - %- road |. - ~> %slog.0^leaf+"clay: building zuse on {}" - =/ gen - ~> %mean.%zuse-parse-fail - (path-to-hoon data /sys/zuse/hoon) - ~> %mean.%zuse-compile-fail - (slap arvo gen) - :: - ++ same-as-home - |= =path + ++ deep + |= [pax=path src=cord] ^- ? + :: XX scry into arvo + :: + :: //=//=/mod/fat + :: =+ (~(get ^de fat) pax) + :: &(?=(^ fil) ?=(%hoon p.fil) =(src q.fil)) + :: =/ our-lobe=lobe - =/ datum (~(got by data) path) - ?- -.datum - %& (page-to-lobe %hoon (page-to-cord p.datum)) - %| p.datum - == + (page-to-lobe hoon/src) =/ =dome dom:(~(got by dos.rom) %home) =/ =yaki (~(got by hut.ran) (~(got by hit.dome) let.dome)) - =(`our-lobe (~(get by q.yaki) path)) + =/ lobe=(unit lobe) + (~(get by q.yaki) (weld pax /hoon)) + &(?=(^ lobe) =(our-lobe u.lobe)) -- :: ++ page-to-cord @@ -1641,7 +1621,11 @@ :: ++ path-to-hoon |= [data=(map path (each page lobe)) =path] - %+ rain path + (rain path (path-to-cord data path)) + :: + ++ path-to-cord + |= [data=(map path (each page lobe)) =path] + ^- @t =/ datum (~(got by data) path) ?- -.datum %& (page-to-cord p.datum) @@ -1878,15 +1862,16 @@ test-ankh (~(got by dir.test-ankh) ta) == :: - :: Find /sys changes; does not reload on first commit + :: Find reef dependency changes :: - ++ need-sys-update + ++ need-reef-update |= changes=(map path (each page lobe)) ^- ? %+ lien ~(tap by changes) |= [=path *] ?| =(/sys/hoon/hoon path) =(/sys/arvo/hoon path) + =(/sys/lull/hoon path) =(/sys/zuse/hoon path) == :: diff --git a/pkg/arvo/sys/zuse.hoon b/pkg/arvo/sys/zuse.hoon index 8abf6004d3..dbe5265730 100644 --- a/pkg/arvo/sys/zuse.hoon +++ b/pkg/arvo/sys/zuse.hoon @@ -29,7 +29,7 @@ :: it's important to keep %zuse minimal. models and :: engines not used outside a vane should stay inside :: that vane. -~% %zuse +> ~ +~% %zuse ..is ~ => :: :: :: :::: :: :: (1) models diff --git a/pkg/urbit/include/c/motes.h b/pkg/urbit/include/c/motes.h index 10f00710ef..206f69dcc7 100644 --- a/pkg/urbit/include/c/motes.h +++ b/pkg/urbit/include/c/motes.h @@ -696,6 +696,7 @@ # define c3__low c3_s3('l','o','w') # define c3__lsh c3_s3('l','s','h') # define c3__lt c3_s2('l','t') +# define c3__lull c3_s4('l','u','l','l') # define c3__lunt c3_s4('l','u','n','t') # define c3__mack c3_s4('m','a','c','k') # define c3__mach c3_s4('m','a','c','h') diff --git a/pkg/urbit/vere/pier.c b/pkg/urbit/vere/pier.c index 31a5dad76b..02d15f2834 100644 --- a/pkg/urbit/vere/pier.c +++ b/pkg/urbit/vere/pier.c @@ -793,7 +793,7 @@ _pier_wyrd_card(u3_pier* pir_u) // u3_noun ver = u3nq(u3i_string(VERE_NAME), VERE_MAJOR, VERE_MINOR, VERE_PATCH); u3_noun kel = u3nl(u3nc(c3__zuse, VERE_ZUSE), // XX god_u->zus_w - // u3nc(c3__lull, PIER_LULL), // XX define + u3nc(c3__lull, u3i_string("lull-kelvin")), // XX define u3nc(c3__arvo, u3i_string("arvo-kelvin")), // XX from both king and serf? u3nc(c3__hoon, 141), // god_u->hon_y u3nc(c3__nock, 4), // god_u->noc_y From cea0db4670f4648552ec7c150541a2ae88036dea Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Thu, 3 Dec 2020 13:56:25 -0800 Subject: [PATCH 29/38] arvo: fills out scry interface --- pkg/arvo/sys/arvo.hoon | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/arvo/sys/arvo.hoon b/pkg/arvo/sys/arvo.hoon index 52e02239df..77dd78e026 100644 --- a/pkg/arvo/sys/arvo.hoon +++ b/pkg/arvo/sys/arvo.hoon @@ -1287,9 +1287,11 @@ == ~ ?+ s.bem ~ - [%whey ~] ``mass/!>(whey) - [%zen %lag ~] ``noun/!>(lag.zen) - [%zen %vere ~] ``noun/!>(ver.zen) + [%whey ~] ``mass/!>(whey) + [%fad %lac ~] ``noun/!>(lac.fad) + [%zen %lag ~] ``noun/!>(lag.zen) + [%zen %ver ~] ``noun/!>(ver.zen) + [%mod %fat *] ``noun/!>((~(get de fat.mod) t.t.s.bem)) == :: ++ poke From 81b868a3644f3fc73d38df714e6e0fc30495e012 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Thu, 3 Dec 2020 13:57:00 -0800 Subject: [PATCH 30/38] clay: scry kernel source out of arvo for reef short-circuit --- pkg/arvo/sys/vane/clay.hoon | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/pkg/arvo/sys/vane/clay.hoon b/pkg/arvo/sys/vane/clay.hoon index 148fdfd6f3..95f18a1248 100644 --- a/pkg/arvo/sys/vane/clay.hoon +++ b/pkg/arvo/sys/vane/clay.hoon @@ -1596,19 +1596,18 @@ ++ deep |= [pax=path src=cord] ^- ? - :: XX scry into arvo + :: XX use roof :: - :: //=//=/mod/fat - :: =+ (~(get ^de fat) pax) - :: &(?=(^ fil) ?=(%hoon p.fil) =(src q.fil)) + :: =/ dat (rof `[our ~ ~] $/[[our $/da/now] mod/fat/pax]) + :: ?: |(?=(~ dat) ?=(~ u.dat)) | + :: =/ nod !<((axal (cask)) q.u.u.dat) :: - =/ our-lobe=lobe - (page-to-lobe hoon/src) - =/ =dome dom:(~(got by dos.rom) %home) - =/ =yaki (~(got by hut.ran) (~(got by hit.dome) let.dome)) - =/ lobe=(unit lobe) - (~(get by q.yaki) (weld pax /hoon)) - &(?=(^ lobe) =(our-lobe u.lobe)) + =/ dat + ;; (unit (unit (axal (cask)))) + ((sloy-light ski) [hoon-version %noun] %$ our %$ da/now mod/fat/pax) + ?: |(?=(~ dat) ?=(~ u.dat)) | + =* nod u.u.dat + &(?=(^ fil.nod) ?=(%hoon p.u.fil.nod) =(src q.u.fil.nod)) -- :: ++ page-to-cord From 6fc40bcea4114f10b9ca30b04211a9c106db8c0a Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Thu, 3 Dec 2020 15:53:18 -0800 Subject: [PATCH 31/38] pill: solid --- bin/solid.pill | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/solid.pill b/bin/solid.pill index 638b96b3cd..5876fd3b34 100644 --- a/bin/solid.pill +++ b/bin/solid.pill @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5402f3b52a34bda8a7189be0644bb6e31c738f358edc272ed4e542f597ed1c07 -size 7294878 +oid sha256:80f25c7953348649f4151c43b03a8025abf458054c66c110839c4c4388c53d06 +size 7345051 From 7584b4d33c8778ddba099d87148d4b9e356c1d1a Mon Sep 17 00:00:00 2001 From: Tyler Brown Cifu Shuster Date: Wed, 2 Dec 2020 19:36:39 -0800 Subject: [PATCH 32/38] eyre: translate login to indigo fixes https://github.com/urbit/landscape/issues/154 --- pkg/arvo/sys/vane/eyre.hoon | 273 ++++++++++++++---------------- pkg/arvo/tests/sys/vane/eyre.hoon | 2 +- 2 files changed, 132 insertions(+), 143 deletions(-) diff --git a/pkg/arvo/sys/vane/eyre.hoon b/pkg/arvo/sys/vane/eyre.hoon index 109397c006..67f28effbc 100644 --- a/pkg/arvo/sys/vane/eyre.hoon +++ b/pkg/arvo/sys/vane/eyre.hoon @@ -236,16 +236,20 @@ :: +login-page: internal page to login to an Urbit :: ++ login-page - |= [redirect-url=(unit @t) our=@p] + |= [redirect-url=(unit @t) our=@p failed=?] ^- octs =+ redirect-str=?~(redirect-url "" (trip u.redirect-url)) %- as-octs:mimes:html %- crip %- en-xml:html + =/ favicon %+ + weld "" + "" ;html ;head ;meta(charset "utf-8"); ;meta(name "viewport", content "width=device-width, initial-scale=1, shrink-to-fit=no"); + ;link(rel "icon", type "image/svg+xml", href (weld "data:image/svg+xml;utf8," favicon)); ;title:"OS1" ;style:''' @import url("https://rsms.me/inter/inter.css"); @@ -254,167 +258,152 @@ src: url("https://storage.googleapis.com/media.urbit.org/fonts/scp-regular.woff"); font-weight: 400; } - html, body { + :root { + --red05: rgba(255,65,54,0.05); + --red100: rgba(255,65,54,1); + --blue05: rgba(33,157,255,0.05); + --blue30: rgba(33,157,255,0.3); + --blue100: rgba(33,157,255,1); + --black05: rgba(0,0,0,0.05); + --black20: rgba(0,0,0,0.2); + --black60: rgba(0,0,0,0.6); + --white: rgba(255,255,255,1); + } + html { font-family: Inter, sans-serif; height: 100%; - margin: 0 !important; + margin: 0; width: 100%; - background: #fff; - color: #000; + background: var(--white); + color: var(--black100); -webkit-font-smoothing: antialiased; line-height: 1.5; - font-size: 12pt; + font-size: 12px; + display: flex; + flex-flow: row nowrap; + justify-content: center; } - a, a:visited { - color: #000; - text-decoration: none; - font-size: 0.875rem; + body { + display: flex; + flex-flow: column nowrap; + justify-content: center; + max-width: 300px; + padding: 1rem; + width: 100%; } - p { - margin-block-start: 0; - margin-block-end: 0; - font-size: 0.875rem; + body > *, + form > input { + width: 100%; + } + form { + display: flex; + flex-flow: column; + align-items: flex-start; } input { - width: 100%; - padding: 0.75rem; - border: 1px solid #e6e6e6; - margin-top: 0.25rem; - margin-bottom: 1rem; - font-size: 0.875rem; + background: transparent; + border: 1px solid var(--black20); + padding: 8px; + border-radius: 4px; + font-size: inherit; + color: var(--black); + box-shadow: none; + } + input:disabled { + background: var(--black05); + color: var(--black60); } input:focus { - outline: 0; - border: 1px solid #000; + outline: none; + border-color: var(--blue30); } - button { - -webkit-appearance: none; - padding: 0.75rem; - background-color: #eee; - border: 1px solid #d1d2d3; - color: #666; - font-size: 0.875rem; - border-radius: 0; + input:invalid:not(:focus) { + background: var(--red05); + border-color: var(--red100); + outline: none; + color: var(--red100); } - footer { - position: absolute; - bottom: 0; + button[type=submit] { + margin-top: 16px; + padding: 8px 16px; + border-radius: 4px; + background: var(--blue100); + color: var(--white); + border: 1px solid var(--blue100); + } + input:invalid ~ button[type=submit] { + border-color: currentColor; + background: var(--blue05); + color: var(--blue30); + pointer-events: none; + } + span.failed { + display: flex; + flex-flow: row nowrap; + height: 16px; + align-items: center; + margin-top: 6px; + color: var(--red100); + } + span.failed svg { + height: 12px; + margin-right: 6px; + } + span.failed circle, + span.failed line { + fill: transparent; + stroke: currentColor } .mono { - font-family: "Source Code Pro", monospace; - } - .gray2 { - color: #7f7f7f; - } - .f9 { - font-size: 0.75rem; - } - .relative { - position: relative; - } - .absolute { - position: absolute; - } - .w-100 { - width: 100%; - } - .tr { - text-align: right; - } - .pb2 { - padding-bottom: 0.5rem; - } - .pr1 { - padding-right: 0.25rem; - } - .pr2 { - padding-right: .5rem; - } - .dn { - display: none; - } - #main { - width: 100%; - height: 100%; - } - #inner { - position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); + font-family: 'Source Code Pro', monospace; } @media all and (prefers-color-scheme: dark) { - html, body { - background-color: #333; - color: #fff; - } - a, a:visited { - color: #fff; - } - input { - background: #333; - color: #fff; - border: 1px solid #7f7f7f; - } - input:focus { - border: 1px solid #fff; - } - } - @media all and (min-width: 34.375rem) { - .tc-ns { - text-align: center; - } - .pr0-ns { - padding-right: 0; - } - .dib-ns { - display: inline-block; + :root { + --white: rgb(51, 51, 51); + --black100: rgba(255,255,255,1); + --black05: rgba(255,255,255,0.05); + --black20: rgba(255,255,255,0.2); } } ''' == ;body - ;div#main - ;div#inner - ;p:"Urbit ID" - ;input(value "{(scow %p our)}", disabled "true", class "mono"); - ;p:"Access Key" - ;p.f9.gray2 - ; Get key from Bridge, or - ;span.mono.pr1:"+code" - ; in dojo - == - ;form(action "/~/login", method "post", enctype "application/x-www-form-urlencoded") - ;input - =type "password" - =name "password" - =placeholder "sampel-ticlyt-migfun-falmel" - =class "mono" - =autofocus "true"; - ;input(type "hidden", name "redirect", value redirect-str); - ;button(type "submit"):"Continue" - == - == - ;footer.absolute.w-100 - ;div.relative.w-100.tr.tc-ns - ;p.pr2.pr0-ns.pb2 - ;a(href "https://bridge.urbit.org", target "_blank") - ;span.dn.dib-ns.pr1:"Open" - ; Bridge ↗ - == - ;a - =href "https://urbit.org/using/install/#id" - =style "margin-left: 8px; color: #2aa779;" - =target "_blank" - ; Purchase - ;span.dn.dib-ns.pr1:"an Urbit ID" - ; ↗ - == + ;p:"Urbit ID" + ;input(value "{(scow %p our)}", disabled "true", class "mono"); + ;p:"Access Key" + ;form(action "/~/login", method "post", enctype "application/x-www-form-urlencoded") + ;input + =type "password" + =name "password" + =placeholder "sampel-ticlyt-migfun-falmel" + =class "mono" + =required "true" + =minlength "27" + =maxlength "27" + =pattern "((?:[a-z]\{6}-)\{3}(?:[a-z]\{6}))" + =autofocus "true"; + ;input(type "hidden", name "redirect", value redirect-str); + ;+ ?. failed ;span; + ;span.failed + ;svg(xmlns "http://www.w3.org/2000/svg", viewBox "0 0 12 12") + ;circle(cx "6", cy "6", r "5.5"); + ;line(x1 "3.27", y1 "3.27", x2 "8.73", y2 "8.73"); + ;line(x1 "8.73", y1 "3.27", x2 "3.27", y2 "8.73"); == + Key is incorrect == - == + ;button(type "submit"):"Continue" == == + ;script:''' + var failSpan = document.querySelector('.failed'); + if (failSpan) { + document.querySelector("input[type=password]") + .addEventListener('keyup', function (event) { + failSpan.style.display = 'none'; + }); + } + ''' == :: +render-tang-to-marl: renders a tang and adds
tags between each line :: @@ -862,28 +851,28 @@ :: =+ request-line=(parse-request-line url.request) %^ return-static-data-on-duct 200 'text/html' - (login-page (get-header:http 'redirect' args.request-line) our) + (login-page (get-header:http 'redirect' args.request-line) our %.n) :: if we are not a post, return an error :: ?. =('POST' method.request) - (return-static-data-on-duct 400 'text/html' (login-page ~ our)) + (return-static-data-on-duct 400 'text/html' (login-page ~ our %.n)) :: we are a post, and must process the body type as form data :: ?~ body.request - (return-static-data-on-duct 400 'text/html' (login-page ~ our)) + (return-static-data-on-duct 400 'text/html' (login-page ~ our %.n)) :: =/ parsed=(unit (list [key=@t value=@t])) (rush q.u.body.request yquy:de-purl:html) ?~ parsed - (return-static-data-on-duct 400 'text/html' (login-page ~ our)) + (return-static-data-on-duct 400 'text/html' (login-page ~ our %.n)) :: =/ redirect=(unit @t) (get-header:http 'redirect' u.parsed) ?~ password=(get-header:http 'password' u.parsed) - (return-static-data-on-duct 400 'text/html' (login-page redirect our)) + (return-static-data-on-duct 400 'text/html' (login-page redirect our %.n)) :: check that the password is correct :: ?. =(u.password code) - (return-static-data-on-duct 400 'text/html' (login-page redirect our)) + (return-static-data-on-duct 400 'text/html' (login-page redirect our %.y)) :: mint a unique session cookie :: =/ session=@uv diff --git a/pkg/arvo/tests/sys/vane/eyre.hoon b/pkg/arvo/tests/sys/vane/eyre.hoon index 61dc66b53d..a05bcf5917 100644 --- a/pkg/arvo/tests/sys/vane/eyre.hoon +++ b/pkg/arvo/tests/sys/vane/eyre.hoon @@ -2229,7 +2229,7 @@ %+ complete-http-start-event :- 200 ['content-type' 'text/html']~ - [~ (login-page:eyre-gate `'/~landscape/inner-path' ~nul)] + [~ (login-page:eyre-gate `'/~landscape/inner-path' ~nul %.n)] == == == :: a response post redirects back to the application, setting cookie From e8ba12c7e342cc8be9ecb2d779ebb1cae53bd403 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Fri, 4 Dec 2020 11:49:10 +1000 Subject: [PATCH 33/38] pull-hook: L review --- pkg/arvo/lib/pull-hook.hoon | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/arvo/lib/pull-hook.hoon b/pkg/arvo/lib/pull-hook.hoon index 78566ad3c2..606c057ae0 100644 --- a/pkg/arvo/lib/pull-hook.hoon +++ b/pkg/arvo/lib/pull-hook.hoon @@ -158,6 +158,7 @@ og ~(. pull-hook bowl) hc ~(. +> bowl) def ~(. (default-agent this %|) bowl) + :: ++ on-init ^- [(list card:agent:gall) agent:gall] =^ cards pull-hook @@ -311,6 +312,7 @@ -- |_ =bowl:gall +* og ~(. pull-hook bowl) + :: ++ mule-scry |= [ref=* raw=*] =/ pax=(unit path) From 08332993b33a77e65cd3ce0d42e318b5fdbf19cc Mon Sep 17 00:00:00 2001 From: Brendan Hay Date: Fri, 4 Dec 2020 08:59:49 +0100 Subject: [PATCH 34/38] build: ensuring correct workflow naming and static binary upload --- .github/workflows/build.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ca821bc083..e3faf128d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ # # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions -name: Build and test urbit binaries +name: build on: [push, pull_request] @@ -55,7 +55,7 @@ jobs: - run: nix-build -A urbit --arg enableStatic true - - if: ${{ matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' }} + - if: ${{ matrix.os == 'ubuntu-latest' }} run: nix-build -A urbit-tests haskell: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97a3cf4520..1cce58ad73 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Upload urbit release tarball +name: release on: [release] @@ -27,7 +27,7 @@ jobs: project_id: ${{ secrets.GCS_PROJECT }} export_default_credentials: true - - run: nix-build -A tarball + - run: nix-build -A tarball --arg enableStatic true - name: Run upload to bootstrap.urbit.org run: | From 7542ff141355975cf934c219fefd45e6be850c4f Mon Sep 17 00:00:00 2001 From: Brendan Hay Date: Fri, 4 Dec 2020 09:20:48 +0100 Subject: [PATCH 35/38] build: upload static tarballs when a new tag is pushed --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1cce58ad73..8295ee5a3d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,9 @@ name: release -on: [release] +on: + release: null + push: + tags: ['*'] jobs: upload: From 92d58338259fcd91c0ae1d0c4d337546bbd9e9cf Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Fri, 4 Dec 2020 00:41:27 -0800 Subject: [PATCH 36/38] u3: disable +scot and +scow jets --- pkg/urbit/jets/tree.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/urbit/jets/tree.c b/pkg/urbit/jets/tree.c index c3d6d680a6..761774bf95 100644 --- a/pkg/urbit/jets/tree.c +++ b/pkg/urbit/jets/tree.c @@ -944,8 +944,11 @@ static u3j_core _141_qua_d[] = { "mole", 7, _141_qua_mole_a, 0, _141_qua_mole_ha }, { "mule", 7, _141_qua_mule_a, 0, _141_qua_mule_ha }, - { "scot", 7, _141_qua_scot_a, 0, _141_qua_scot_ha }, - { "scow", 7, _141_qua_scow_a, 0, _141_qua_scow_ha }, + // XX disabled, implicated in memory corruption + // write tests and re-enable + // + // { "scot", 7, _141_qua_scot_a, 0, _141_qua_scot_ha }, + // { "scow", 7, _141_qua_scow_a, 0, _141_qua_scow_ha }, { "slaw", 7, _141_qua_slaw_a, 0, _141_qua_slaw_ha }, {} }; From 3be0ab503009eaf14413f85f5e268fd52006b25b Mon Sep 17 00:00:00 2001 From: fang Date: Fri, 4 Dec 2020 13:45:35 +0100 Subject: [PATCH 37/38] ted: update straggler threads for vase unit change Also cleans up a duplicate case in a ?-. --- pkg/arvo/ted/aqua/dill.hoon | 1 - pkg/arvo/ted/group/on-leave.hoon | 2 +- pkg/arvo/ted/group/on-remove-member.hoon | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/arvo/ted/aqua/dill.hoon b/pkg/arvo/ted/aqua/dill.hoon index 7fc87cb3d4..4d3b7b2e4e 100644 --- a/pkg/arvo/ted/aqua/dill.hoon +++ b/pkg/arvo/ted/aqua/dill.hoon @@ -26,7 +26,6 @@ %sag ~& [%save-jamfile-to p.b] line %sav ~& [%save-file-to p.b] line %url ~& [%activate-url p.b] line - %klr ~& %unhandled-case-klr "" == ~? !=(~ last-line) last-line ~ diff --git a/pkg/arvo/ted/group/on-leave.hoon b/pkg/arvo/ted/group/on-leave.hoon index aa3fcad4e2..6bd00c4c64 100644 --- a/pkg/arvo/ted/group/on-leave.hoon +++ b/pkg/arvo/ted/group/on-leave.hoon @@ -9,7 +9,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([=update:grp ~] arg) +=+ !<([~ =update:grp] arg) ?. ?=(%remove-group -.update) (pure:m !>(~)) ;< =bowl:spider bind:m get-bowl:strandio diff --git a/pkg/arvo/ted/group/on-remove-member.hoon b/pkg/arvo/ted/group/on-remove-member.hoon index 3c295353ab..d7989e3d52 100644 --- a/pkg/arvo/ted/group/on-remove-member.hoon +++ b/pkg/arvo/ted/group/on-remove-member.hoon @@ -8,7 +8,7 @@ |= arg=vase =/ m (strand ,vase) ^- form:m -=+ !<([=update:grp ~] arg) +=+ !<([~ =update:grp] arg) ?. ?=(%remove-members -.update) (pure:m !>(~)) ;< =bowl:spider bind:m get-bowl:strandio From 18de133167d0ec3f132fcf3bd8f5e406c8c43cd6 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Fri, 4 Dec 2020 14:43:24 -0500 Subject: [PATCH 38/38] landscape: remove ~2020.12 breach banner --- pkg/interface/src/views/App.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/pkg/interface/src/views/App.js b/pkg/interface/src/views/App.js index c44ed52914..3e533d6aef 100644 --- a/pkg/interface/src/views/App.js +++ b/pkg/interface/src/views/App.js @@ -142,21 +142,6 @@ class App extends React.Component { : null} - banner = e} - display={showBanner} - justifyContent="space-between" - width='100%' - p='2' - backgroundColor='yellow'> - - A network-wide breach is scheduled for early December 2020. Please visit urbit.org/breach for more information. - - { - banner.style.display = "none"; - localStorage.setItem("2020BreachBanner", "none"); - }}>Dismiss -