►
Description
In this session, we pair up on an issue to prompt the user for some information to connect to a remote development environment.
https://gitlab.com/gitlab-org/gitlab-web-ide/-/issues/38
A
Reusable
this
is
going
to
be
probably
really
specific
to
this
issue,
but
it's
still
helpful.
So
this
is
when
we
were
pairing
a
week
or
so
ago.
We
were
trying
to
see
if
we
could
get
a
button
to
go
through
this
forum,
and
we
can
so
that's
nice.
A
So
now
we
want
to
have
some
sort
of
message
here
and
that's
why
I
paint
Marcel
to
try
to
see
what
do
we
actually
want
to
say
here
at
the
terminal
and
then
the
button
is
going
to
collect
the
remote
config
properties,
so
we're
going
to
use
the
vs
code
extension
API
to
request
these
from
the
user,
and
that
opens
up
this
little
box
at
the
top
and
then
when
they
submit
it.
Here's
the
flow
that
we're
thinking
of
is.
A
We
will
then
do
a
post
to
the
end
point
of
the
IDE
controller,
so
that
the
connection
token
is
not
in
the
URL
parameters
and
stuff
and
then
that's
going
to
trigger
the
IDE
controller
to
call
start
remote
instead
of
just
start,
which
currently
calls
start
Based
on
data
gets
from
the
route,
but
in
our
new
case
it
will
call
start
remote
based
on
the
data
gets
from
the
query
param
or
from
the
from
the
post.
So
that's
that's
basically
it
so
then
I
broke
it
into
really
really
small
steps.
A
It's
a
large
that
too
yeah
yeah,
okay,
yeah
we'll
need
plan
that
I
was
thinking
is
so
the
client
only
config
will
need
to
pass
down
a
function
for
how
we
want
to
handle
starting.
The
remote
I
get
the
remote
config.
So
now
the
client
will
need
to
provide
okay.
They
went
through
the
whole
user
Farm
we're
ready
to
handle
it
now.
So
we're
going
to
run
that
post.
A
A
Yeah-
and
so
one
of
the
one
of
the
the
interesting
caveats
here
is
that
the
way
these
configs
get
passed
down
through
the
iframe
and
stuff
currently
is
they
get
serialized
and
serialized
into
that
iframe,
but
now
we're
suggesting
we
need
a
function
in
the
config.
So
how
do
we
handle
a
function?
A
And
we
can
use
the
message
Api
to
do
this?
We
already
kind
of
do
that
with
the
ready
event,
oh
yeah,
which
I've
added
links
to
so
we
can.
A
We
could
try
that
out
and
then-
and
so
once
we
once
we
add
one
that
can
be
run,
that's
kind
of
one
step
and
then
the
other
step
would
be
adding
that
welcome
view
that
actually
adding
the
welcome
view
that
actually
triggers
the
user
form
and
stuff
and
here's
the
relevant
vs
code
API
with
some
of
those
functions,
but
here's
the
code
that
we
were.
We
were
putting
together
to
actually
run
this
bit.
A
So
that's
it.
Yeah
sounds.
B
Good,
can
we
make
like?
Can
we
use
a
vs
code
API
to
create
a
port
with
more
than
one
field.
A
That's
a
really
good
question:
let's
see.
A
A
A
A
I
don't
know
like
it's
a
good
question
and
I
really
don't
know
it's
kind
of
trying
to
did
some
feedback
from
Marcel
about
that.
But
he
asked
some
good
questions
which
I
need
to
respond
to.
B
Just
thinking
because
we
have
like
we
need
to
set
several
pieces
of
data
like
right
now,
we're
gonna
make
progress,
but
just
like
I
don't
know,
concatenating
them
in
a
single
field.
I
think
that's!
Okay.
You
know
like
for
the
first
iteration.
Maybe
we
should
like
eat
another
iteration
Implement
that
webview
or
something
like
that.
A
So
I
I
the
way
I
think
I
normally
see
this
done
is
like
you'll,
see
and
I
think
we're
planning
to
do
something
similar
when
we
want
to
commit
from
here.
You
can
pick
it's
like
we're.
Gonna
commit
and
we're
gonna
show
three
of
these
like
one
after
the
other.
It's
like!
Oh,
do
you
want
to
start
a
new
marriage
request
with
this?
Yes,
and
then
do
we
want
to
do.
We
want
to
create
a
new
Branch
for
it?
C
B
A
True
too,
so,
let's
I
think
we're
just
going
to
show
these
input
box
one
after
another.
We'll
show
like
three
of
them.
It's
kind
of
I
think
the
easiest
thing
to
do:
yeah,
whatever.
A
This
is
just
our
main
IDE
controller
that
just
has
an
index.
A
I
was
thinking
we
could
either
introduce
a
new
action,
a
new
endpoint
and
we
can
only
post
to
it
and
that
post
is
going
to
be
important
because
we
don't
want
to
just
throw
the
connection
token
in
the
we
don't
want
to
just
throw
the
connection
token
in
the
URL.
So
we
need
some
sort
of
endpoint
on
the
IDE
controller
to
receive
a
post.
B
C
A
A
A
C
Yeah:
okay,
a
complete
aside
yesterday,
I
realized
that
you
know
how.
Yesterday
we
were
talking
about
the
the
web
IDE
package,
like
has
all
of
these
included
loose
dependencies
like
the
whole
node
modules
is
basically
part
of
the
package
that
is
in
the
gitlab
known
modules.
C
Those
really
mess
with
with
jet
brains
it
like
finds
all
of
the
times
and
expect
function
in
those
like
instead
of
the
just
expect,
and
because
they're
loose
files
or
I
don't
know
why
and
like
I
tried
for
like
an
hour
to
make
it
find
right
when
it
failed,
but
it
was
interesting
not
saying
we
need
to
do
anything
about
it.
Yeah
first
thing
is
slightly
annoying.
A
Yeah
yeah,
no,
that
is
that,
can
be
annoying
okay
yeah.
So,
let's
start
on
setting
up
the
example
project
to
kind
of
receive
something
like
this
and
what
I'm
mostly
interested
is
I
think
this
will
be
the
more
interesting
thing
to
solve
so
I
might,
rather
than
like
even
showing
three
three
user
inputs.
A
I'm
just
gonna
think
I'm
just
going
to
apply
this
patch,
but
instead
of
just
showing
this
information
message,
let's
try
to
do
the
path
that
we
would
do
if
we
had
that
configuration
parameter
coming
so
that
would
be
cool.
Let's
try
that
out
so
I'm
gonna
go
to
I.
Have
too
many
stuff
go
I'm
gonna
go
to.
A
The
number
of
folder
regions
is
limited.
What
are
you
talking
about.
A
All
right
so
here
I
am
on
Main.
I
will
create
a
branch
with
this
and
we're
going
to
call
it
add
him
we'll
see
this
first
thing.
Yeah
add
handle
start
remote.
A
B
A
Terminal
has
this
welcome
view
of
thing.
I
think
I
know
how
to
make
this
button
like
a
full
screen
button.
I
really
really
want
to
do
that.
Well,
let
me
at
least
try
it's
like.
It
needs
to
be
surrounded
with
lines
to
make
the
button
a
full
screen
like
button.
A
Oh
wait,
that's
not
the
right
one!
This
is
the
right
one
and
we're
just
gonna
it's
it's
great!
A
A
A
A
B
A
B
So
I
have
us:
well
it's
a
kind
of
unrelated
question,
but
how
we
consider
using
Shadow
belts
instead
of
five
frames
to
to
insert
the
web
ID
inside
the
GitHub
application.
A
B
Yeah
yeah,
it's
that.
A
Know
the
dark
thing
yeah
when,
when
they
asked
me
what
kind
of
front-end
developer
I
wanted
to
be
I
chose,
I
chose
the
path
of
righteousness,
so
I
did
not
get.
The
I
did
not
get
the
Rick
radicon.
A
A
No
so
I'm
not
familiar
with
Shadow
Realms
at
all.
Clearly.
B
C
A
No
reason
iframe
is
just
a
implementation
detail.
We
just
want
something
sandboxed,
and
so,
if
there's
other
sandboxes
and
that'd
be
really
interesting,
the
thing
that
would
we
would
definitely
run
into
issues
if
we
is,
if
we
just
did
not
have
a
Sandbox
and
that's
that's
why
it's
worth
wrapping
all
this
in
an
iframe.
A
So
that's
really
interesting.
Now
I'll
have
to
check
it
out
and
yeah
if
you
want
to,
if
you
wanna,
if
you
want
to
see
if
it'll
work
so
that
that
would
basically
look
like
in
our
web
IDE
here,
where
we're
doing
all
this
iframe
creating
stuff
is,
maybe
we
just
create
some
sort
of
Shadow
Realm.
B
I
thought,
like
Firefox
I,
think
that
they
they're
enduring
team,
publish
a
blog
post
about
inclusions,
but
maybe
I,
don't
know,
but
I
know
that,
like
in
the
future,
I
think
that
it's
a
it's
a
better
alternative
than
that
I
promise.
Maybe
next
year
it's
easier
to
provide
a
better
user
experience.
We
don't
have
a
lot
all
of
the
limitations
that
they've
been
easier
to
communicate
between
the
outer
environment
and
they
and
the
inner
environments.
A
I
think
I
see
what
you're
saying
it's
possible.
That
vs
code
depends
on
more
of
the
like
document
being
globally
available
because
it
it
writes
it
creates
like
some
globals
and
we're
also
loading
like
vs
code,
CSS
and
stuff
as
well
and
oh
iframe
helps
all
of
that
be
sandbox.
So
I
don't
know
that
would
be,
but
that's
interesting,
I'm
not
familiar
Shadow
Realms
at
all.
A
Well
and
that's
a
really
I'm
looking
at
this
and
I'm
like
wow,
there's
a
lot
of
use,
use
cases
here
and
I.
Wonder
like
this
would
be
a
huge
Improvement
on
vs
code
already
for
sandboxing
extensions,
so
that
seems
really
interesting.
A
Oh
gosh,
another
thing
about
two
like
we
do
so
much
like
when
we
render
mermaid
stuff
we've
now
wrapped
all
of
our
mermaid
stuff
in
the
iframe
for
security
reasons,
and
maybe
something
like
this
would
be
simpler.
That's
really
interesting.
B
A
That's
a
that's
an
interesting
point:
where
did
you?
Where
did
where
did
you
pick
up
the
shadow
Realms?
Was
this
when
you're
communing,
with
the
data
demons.
B
Yeah
I
think
that
I
that
I,
that
I
heard
about
the
other
factors
I
always
like
feeling
harkeness
and
I,
always
pick
that
kind
of
stuff.
Yeah.
A
B
A
Our
boarding
stuff-
yes,
you
can
do
that.
Okay,
thanks
all
right.
Yes,
let's
go
back
to
where
we
have
our
button.
I
thought
I
could
make
this
a
full
screen
button,
but
that
wasn't
really
doing
anything.
So
that's
not
a
problem,
though
here,
instead
of
showing
the
information
message
so
right
now
we
just
show
input
box
and
I,
say
URL,
but
looking
at
what
we
actually
call
it
everywhere
else,
I
think
we
want
to
call
it
remote
Authority.
A
So
let
me
see
what
labels
we
use
when
we
actually
run
this
thing
yeah,
we
call
it
remote,
Authority,
so
I
think
I'm
going
to
call
it
remote
Authority
and
then
what
we
want
to
do
is
so
to
do
gather
more
info,
which
is
host
path
and
connection
tokens.
A
But
let's
assume
we
got
all
this
stuff,
so
we
want
to
just
like
when
we're
calling
ready,
we
want
to
call
something:
that's
like!
Oh
we're.
Gonna
go
start
the
remote
stuff.
A
Let's
go
ahead
and
Export
one
here,
start
remote
and
we'll
take
in
our.
A
A
Is
a
pretty
so
it's
like
a
promise.
This
is
a
level
of
abstraction
above
a
promise.
So
for
some
reason,
vs
code
is
required.
Thenables.
A
What
I'm
going
to
run
is
vs
code
commands
execute
command
and
we
want
to
do
this
command
start
remote
with
our
vowel
that
we
got
okay.
This
is
failing
because,
oh
because
it's
it
needs
to
return,
it
actually
needs
to
return
a
promise.
I,
actually
don't
need
to
declare
the
type.
It's
smart
enough
to
know
what
type
I
am
returning
all
right.
Let
me
jump
to
the
vs
code.
Mediator
commands
so
here
in
our
commands.
A
C
A
I'll
go
ahead
and
start
doing
the
right
way.
You
need
to
call
it
this
probably
gitlab
web
ID
start.
A
Remote
I
don't
know
what
naming
eventually
we
want
to
use
here
either.
Okay,
but
I'll
go
ahead
and
then
create
these
commands
here.
So
these
is.
This
is
where
we
declare
and
create
all
of
those
mediator,
commands
and
upgrade
that
here
with
start
remote
and
the
Handler.
A
A
We
have
to
we'll
just
post
a
message
from.
B
A
A
B
A
Can
you
can
you,
can
you
guide
me
through
that.
B
Yeah,
like
word
in
line
four
instead
of
exploring
arcs.
Well,
that's
that's
almost
exactly
what
I,
what
I
mean?
It's
just
like
that
that
works.
Now
that
object
has
like
a
an
Arts
property
that
contains
the
the
arguments
that
we
want
to
attach
to
the
government
yeah,
but
like
it's.
What
I
meant
was
like
not
expressing
them,
because
in
that
case
it
would
be
like
it
makes
the
key
property
with
the
data
that
we
are
passing
through.
The
conversion.
A
Right
got
it
got
it
so
right
now
we
do
so
it's
probably
wise
for
us
to
have
the
same
interface
as
this
function.
That
we'll
call.
A
And
yeah,
that's
the
same!
So,
let's
just
let's
just
use
Val
and
let's
just
let's
just
throw
it
in
there
as
well
like
so
whenever,
whatever
I
think
down,
the
line
will
end
up
having
like
config
like
a
whole
config
and
we'll
we'll
just
pass
that
down
as
well.
So
that
makes
sense.
Does
this
sound
good.
B
C
C
A
A
We
need
to
handle
these.
This
ready
message.
A
A
I've,
all
of
this
of
starting
the
web
idea
is
a
promise
and
I
thought
it
made
sense.
We'll
just
resolve
the
promise
when
we're
ready.
So
so
that's
what's
happening
here.
A
So
I
do
think
we
will
so
this
is
all
handling
just
waiting
for
ready,
but
I
think
we're
going
to
create
one
to
handle.
A
And
we'll
need
our
config.
A
Okay,
I,
don't
think
we
need
to
return
anything,
but
before
we
wait
for
ready,
that's
we'll
have
to
set
up
handling
the
messages.
First,
we'll
meet
our
campaign.
This
is
where
we
will
do
a
similar
thanks.
What
we're
doing
up
here
and
I
guess
we
don't
need
to
figure
out
how
we
don't
want
to
duplicate
this
later,
if
that's
a
problem,
but
when
we
listen
to
messages.
A
A
B
I
think
that
type
3
supports
enumerations
right.
A
Yeah,
we
could
totally
do
it
that
way
too
yeah
and
you
can
have
it's
like
string
based
edoms
as
well.
That's
a
good
yeah.
A
A
So
that's
where
that's
where
this
thing
is
actually
going
to
live.
Yeah
oops,
we're
gonna
have
handle
start
remote
is
optionally,
a
something
that
takes
in
a
string
and
doesn't
need
to
return
anything.
B
I
go
I
got
lost
in
there.
Show
me
the.
How
is
these
Handler
the
handle?
Is
our
remote
works
like?
How
do
we
call
it
and
how
do
we
pass
it?
I
will
pass
it
out
from
the
iframe.
A
A
So
I
think
I'm
gonna
do
this
I,
don't
know
if
this
is
good
or
not.
What
I'm
going
to
do
is
this
I'm
going
to
say
handle
just
for
client.
A
Then,
when
I'm
in
here
I
can
I
can
call
this
so
I
could
say
hey
if
we
have
start
if
this
is
start
remote
and
if
we
have
a
handle
start
remote.
B
A
It's
whatever
we'd
say
it
wants
to
return.
So
we
care
about
waiting
for
a
promise.
We
can
do
that
or
that
space
we're
giving
the
client
the
interface
they
have
to
adhere
to
so.
A
B
Oh
okay,
I
thought
that,
like
to
start
remote,
we
need
to
make
a
vaccine
APA
call
that
returns
a
token
and
they
will
use
that
token
to
connect
the
web
ID
to
the
to
the
remote
session.
The
remote
runtime.
A
B
Wrong
I
mean
I
I,
don't
know
I
just
like
talking
based
on
what
we
we've
been
talking
about.
Yeah.
A
I,
like
it
I,
think
it's
good.
It's
still
yeah
I
think
it's
good.
We
still
won't
really
be
able
to
wait
for
the
promise
here,
which
is
interesting.
A
I'll,
add
it
to
do.
Do
we
need
to
wait
for
this.
A
Yeah,
what's
your
problem,
it
wants
me
to
wait
for
it.
B
Then,
let's
all
make
it
a
promise,
you
never
go
out.
Okay,
if
we
need
it,
it's
gonna
be
a
progress
right.
A
Yeah,
if
we
need
to
be
a
promise,
we'll
figure
that
out,
but
in
this
context
we
won't
be
able
to
wait
for
it
because,
like
the
message
listener
can't
be,
we
that'll
be
a
little
interesting.
A
A
That's
a
value
for
okay,
the
type.
A
I
think
I
think
that's
great,
so
now
we're
so
close.
So
close,
oh
man
and
we're
almost
we're
almost
at
time
now,
let's
go
to
when
we
actually
start
this
thing
up.
A
A
A
Oh
sorry,
sorry,
sorry
so
close,
not
yet
I,
don't
think
yeah
we're
not
yeah
it
it.
It's
still
showing
the
message.
Instead
of
calling
that
command
that
we
went
into
so
here
where
we're
handling
the
start,
remote
command
and.
A
What's
wrong
with
you?
Oh
so
we'll
only
do
this
if
we
actually
got
something.
A
Is
really
good
all
right?
Let's
try
that
again.
A
B
A
I
forgot:
we
have
query
prams
for
this
stuff,
so
we
could.
We
can
get
really
fancy
with
it.
I
will
I
want
to
get
just
a
little
Fancy
with
it.
Yes,
we'll
call
it
remote
host
yeah.
Let's
do
it
so
here
handle
start
remote
will
do
this.
We
will
want
to
get
the
current
URL
but
add
the
query.
Pram
current
URL
add
free
pram
for
remote
hosts.
A
And
visit
that
URL,
how
do
we
do
that?
Something
like
something
like
this
is.
B
Yeah
that
should
like
take
it
too
early
on
or
just
assigning
directly
to
window.location
yeah.
A
A
A
Remote
host
will
work,
it's
just
you
need
to
set
it
up,
so
visual
promise
would
be
able
to
help
with
that,
but
Michelle
would
be
able
to
help
with
that,
since
Thomas
is
out
too.
So
that's
very
cool
yeah.
B
Cool!
It's
that's!
It's
really,
nice
that
we
only
have
to
to
hook
everything
up
right,
I,
just
like
connecting
all
the
dots.
A
Yeah
yeah
so
now
yeah
from
from
our
from
this
side,
we
should
be
able
to
have
the
example
that
just
loads
it
with
all
those
parameters
that
are
set
up
and
then
then
it's
publishing
the
package
and
getting
it
hooked
up
to
the
gitlab
thing
and
that's
it
yeah.
So
it
should
be
pretty
good
I'm
glad
that
the
post
message
thing
worked
out.
Well,
so
let
me
commit
this
as
I.
Don't
know.
A
What
did
we
do?
We
add
start
remote
button
to
empty
terminal
view.
Also
added
mechanical
sort
of
config
to
donate
I'll
make
a
thing.
A
Yeah
also
added
an
example,
implementation
for,
and
it
was
starting
to
config-
maybe
maybe
that's
a
sign
that
I'm
not
good
at
making
small
commits.
If
all
my
commits
have
also
also.
B
Yeah
I
hope
that
we
can
continue
doing
this.
These
preparing
sessions,
I'm
gonna,
be
out
until
October
31st,
because
I'm
gonna
be
traveling
Spain,
so
I
won't
be
able
to
help
a
lot
on
this
one,
but
I'm
glad
that
that
I'm
learning
a
lot
so
probably
in
the
next
mile
so
or
after
I
go
back.
I
can
be
I,
don't
know,
doesn't
start
quite
small
contributions
and
continue
learning.
A
Yeah
yeah,
yeah
and
I
think
addressing
a
lot
of
the
to
do
is
that
we
created
here
too,
would
be
a
big
deal
so
yeah.
That's
that
sounds
awesome
cool
all
right,
I
will
let
you
go
thanks
for
hanging
out
and
regime.
Thank
you.
Paul
have
a
good
day,
bye.