Repository navigation
Expand file tree
/
Copy pathinterview.html
More file actions
660 lines (641 loc) · 25.5 KB
/
Copy pathinterview.html
File metadata and controls
660 lines (641 loc) · 25.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>CodeTrial - Interview</title>
<link rel="stylesheet" href="/styles.css" />
<script src="/vendor/livekit-client.js"></script>
<script src="/runtime-config.js"></script>
<script type="module" src="/interview.js"></script>
</head>
<body>
<main class="interview-shell">
<aside id="interview-sidebar" class="interview-sidebar">
<header class="interview-header">
<div class="brand">CODETRIAL</div>
<h1 id="problem-title">Loading interview...</h1>
<p id="problem-meta"></p>
<div class="status-row">
<div class="agent-pill" title="AI interviewer status">
<span class="agent-viz" aria-hidden="true">
<span></span><span></span><span></span><span></span
><span></span>
</span>
<span id="agent-state">Connecting...</span>
</div>
<div id="timer" class="timer" title="Time remaining">00:00</div>
</div>
<div
id="presence-banner"
class="presence-banner"
hidden
role="alert"
aria-live="assertive"
></div>
<!-- One framework at a time, never both: the coding round is REACTO
and the behavioral round is STAR, and showing the ten together
told a candidate in step two about six steps that are not their
problem yet. Ticks arrive from the interviewer over the control
topic as it banks evidence. -->
<ol
id="framework-progress"
class="framework-progress"
hidden
aria-label="Interview steps"
></ol>
<div class="control-row">
<button id="mic" class="pill-button" type="button">Mic on</button>
<button id="pause" class="pill-button" type="button" hidden>
Pause
</button>
<button
id="thinking"
class="pill-button"
type="button"
aria-pressed="false"
>
Thinking
</button>
<button
id="yield-turn"
class="pill-button"
type="button"
title="Alt+Enter"
aria-keyshortcuts="Alt+Enter"
>
Your turn is done
</button>
<button id="end" class="pill-button danger" type="button">
End interview
</button>
<!-- The notice promises a candidate can withdraw during the
interview, so there has to be something to withdraw with.
Hidden unless this server records. -->
<button
id="withdraw-consent"
class="pill-button danger"
type="button"
hidden
>
Stop recording
</button>
<!-- What the server says happened to the recording. A candidate who
agreed to be recorded is owed the answer to "is it". -->
<span
id="recording-state"
class="muted small"
hidden
role="status"
></span>
</div>
<!-- Meet is a presentation channel, not CodeTrial's audio transport:
LiveKit plays Jim into this tab and Meet re-shares the tab. -->
<details id="meet-mode" class="meet-mode">
<summary id="meet-mode-summary">Present in Google Meet</summary>
<div class="meet-mode-body">
<ol id="meet-mode-steps" class="meet-mode-steps">
<li>
Start the CodeTrial interview and confirm the media preflight.
</li>
<li>In Meet, click Present now.</li>
<li>Choose <strong>A tab</strong>.</li>
<li>Select the CodeTrial tab.</li>
<li>
Enable <strong>Share tab audio</strong> before clicking Share.
</li>
</ol>
<p id="meet-mode-reminder" class="meet-mode-reminder">
Share <strong>A tab</strong>, not a window or your whole screen,
and turn on <strong>Share tab audio</strong>. Without tab audio
the interviewer sees you but never hears Jim.
</p>
<p id="meet-mode-mic-note" class="muted small">
Your microphone stays with CodeTrial and cannot also serve Meet,
so the interviewer hears you by joining the interview room, not
through Meet. Leave your camera off in Meet only if you did not
tick the presentation box during the media check. Wear
headphones so Jim is not re-captured by your mic.
</p>
<div id="meet-output-row" class="meet-mode-output">
<label for="meet-output-select">Play Jim through</label>
<select id="meet-output-select"></select>
</div>
<p id="meet-output-note" class="muted small" hidden></p>
<p id="meet-mode-privacy" class="muted small">
Once you share the tab, Google Meet controls who receives this
interview. Recordings or copies made in Meet, or by anyone in
the call, are outside CodeTrial's control.
</p>
</div>
</details>
</header>
<nav class="tab-row" aria-label="Interview details">
<button id="problem-tab" class="tab-button selected" type="button">
Problem
</button>
<button id="transcript-tab" class="tab-button" type="button">
Transcript
</button>
</nav>
<section id="problem-panel" class="side-panel"></section>
<section id="transcript-panel" class="side-panel" hidden>
<div class="empty-transcript">
<span aria-hidden="true">...</span>
<p>No conversation yet</p>
<p>
Everything you and Jim say appears here in real time, and is
included in your downloadable report.
</p>
</div>
</section>
</aside>
<!-- Between the sidebar and whichever panel is beside it, the editor or
the whiteboard. A separator that takes focus is a widget, so
splitter.js keeps its aria-value attributes; the stylesheet hides it
where the page is a single column and there is no width to trade. -->
<div
id="sidebar-resizer"
class="splitter"
role="separator"
aria-orientation="vertical"
aria-label="Resize sidebar"
aria-controls="interview-sidebar"
tabindex="0"
></div>
<section class="editor-panel">
<div class="editor-toolbar">
<div class="language-tabs" aria-label="Language">
<button
class="language-button selected"
type="button"
data-language="python"
>
Python 3
</button>
<button
class="language-button"
type="button"
data-language="javascript"
>
JavaScript
</button>
<button class="language-button" type="button" data-language="c">
C
</button>
<button class="language-button" type="button" data-language="cpp">
C++
</button>
<button class="language-button" type="button" data-language="java">
Java
</button>
</div>
<div
class="font-size-control"
role="group"
aria-label="Code font size"
>
<button
id="editor-font-smaller"
class="font-size-button"
type="button"
title="Smaller code"
aria-label="Smaller code"
>
A-
</button>
<button
id="editor-font-larger"
class="font-size-button"
type="button"
title="Larger code"
aria-label="Larger code"
>
A+
</button>
</div>
<p class="compile-disclosure">
C, C++ and Java runs are sent to Compiler Explorer.
</p>
<div class="sync-state"><span></span>Live-synced to Jim</div>
<button
id="editor-theme-toggle"
class="font-size-button"
type="button"
title="Light editor theme"
aria-pressed="false"
>
Light editor theme
</button>
<button
id="run-tests"
class="run-button"
type="button"
title="Run tests (Ctrl+Enter / ⌘Enter)"
aria-keyshortcuts="Control+Enter Meta+Enter"
>
Run tests
</button>
</div>
<!-- The textarea stays the source of truth and keeps native editing;
the pre behind it only paints the colors. -->
<div class="editor-stack">
<pre id="editor-lines" aria-hidden="true"></pre>
<pre id="editor-highlight" aria-hidden="true"><code></code></pre>
<textarea
id="editor"
spellcheck="false"
aria-label="Code editor"
></textarea>
</div>
<div
id="test-drawer-resizer"
class="splitter test-drawer-resizer"
role="separator"
aria-orientation="horizontal"
aria-label="Resize test panel"
aria-controls="test-drawer"
tabindex="0"
></div>
<section id="test-drawer" class="test-drawer">
<details id="candidate-case">
<summary>
<span class="drawer-chevron" aria-hidden="true"></span>
<span>Add a case</span>
</summary>
<label
>Input JSON
<textarea
id="candidate-case-input"
rows="2"
aria-label="Candidate test input"
></textarea>
</label>
<label
>Expected JSON (optional)
<input
id="candidate-case-expected"
aria-label="Candidate expected output"
/></label>
<button id="candidate-case-add" type="button">Add case</button>
<p id="candidate-case-status" class="muted small" role="status"></p>
<ol id="candidate-case-list" class="small"></ol>
</details>
<button id="results-toggle" type="button">
<span
id="results-chevron"
class="drawer-chevron"
aria-hidden="true"
></span>
<span id="results-label">Test results</span>
</button>
<div id="results-body" class="results-body">
<p class="muted small">
Run the test cases any time - Jim sees your results too.
</p>
</div>
</section>
</section>
<!-- The other half of the shell, in place of the editor when the lobby
asked for a whiteboard interview. Both are in the page and one is
hidden, rather than built at runtime: the panel is laid out by the
same grid either way, and a canvas whose element was created after
the shell had been measured came up at the wrong size.
The pen row is filled by whiteboard.js from the colours it draws
with, so the board and the swatches cannot come to disagree. -->
<section id="board-panel" class="board-panel" hidden>
<div class="board-toolbar" role="toolbar" aria-label="Whiteboard tools">
<div
id="board-pens"
class="board-pens"
role="group"
aria-label="Pen colour"
></div>
<button
id="board-eraser"
class="board-tool"
type="button"
aria-pressed="false"
>
Eraser
</button>
<!-- Filled from ERASER_WIDTHS like the pens are from PEN_COLORS.
Picking a size picks the eraser too: nobody sizes an eraser they
are not about to use. -->
<div
id="board-eraser-sizes"
class="board-sizes"
role="group"
aria-label="Eraser size"
></div>
<button id="board-undo" class="board-tool" type="button">Undo</button>
<button id="board-redo" class="board-tool" type="button">Redo</button>
<button
id="board-clear"
class="board-tool"
type="button"
title="Clear the board; Undo restores it"
>
Clear board
</button>
<div class="sync-state"><span></span>Live-synced to Jim</div>
</div>
<div class="board-surface">
<canvas
id="board"
width="1600"
height="1000"
aria-label="Whiteboard"
></canvas>
</div>
<p class="board-note muted small">
Jim sees the board a moment after you stop drawing. Nothing here runs:
trace your examples by hand.
</p>
</section>
<!-- Shown before the room is joined: the interview starts only after
required local media is proven. -->
<section id="audio-check" class="overlay">
<div class="audio-check-card">
<h2>Media preflight</h2>
<p>
Confirm output and microphone before the interview starts. Camera is
optional unless this interview is recorded.
</p>
<div class="interviewer-style-controls">
<div>
<label for="interviewer-voice">Jim's voice</label>
<select id="interviewer-voice">
<option value="">Default</option>
<option value="Puck">Puck</option>
<option value="Charon">Charon</option>
<option value="Kore">Kore</option>
<option value="Orus">Orus</option>
<option value="Random">Random</option>
</select>
</div>
<div>
<label for="interviewer-accent">English accent</label>
<select id="interviewer-accent">
<option value="">Default</option>
<option value="American">American</option>
<option value="British">British</option>
<option value="Australian">Australian</option>
<option value="Canadian">Canadian</option>
<option value="Indian">Indian</option>
<option value="Random">Random</option>
</select>
</div>
</div>
<p class="muted small">Random is chosen once per interview.</p>
<p id="round-plan-summary" class="muted small"></p>
<div class="audio-check-step" id="audio-step-output">
<p>
<span class="step-mark" aria-hidden="true"></span
><strong>Output</strong> —
<span id="audio-output-state" aria-live="polite"
>play a test sound and confirm you heard it.</span
>
</p>
<div class="audio-check-actions">
<button id="audio-test-tone" class="pill-button" type="button">
Play test tone
</button>
<button id="audio-test-speech" class="pill-button" type="button">
Can't hear the tone?
</button>
<button
id="audio-heard"
class="pill-button waiting"
type="button"
aria-disabled="true"
>
I heard it
</button>
</div>
<audio
id="audio-test-voice"
src="./audio/test-voice.wav"
preload="none"
hidden
></audio>
<p class="muted small">
If the tone is silent, try the test voice. Playback noise
reduction or audio enhancements may filter test sounds. If both
are silent, check your output device and volume, or try turning
those effects off in your audio settings.
</p>
</div>
<div class="audio-check-step" id="audio-step-mic">
<p>
<span class="step-mark" aria-hidden="true"></span
><strong>Microphone</strong> — say something and watch the level.
</p>
<div
class="audio-meter"
role="img"
aria-label="Microphone input level"
>
<span id="audio-meter-fill"></span>
</div>
</div>
<div class="audio-check-step" id="audio-step-camera">
<p>
<span class="step-mark" aria-hidden="true"></span
><strong>Camera</strong> —
<span id="camera-state" aria-live="polite"
>grant access and keep video on.</span
>
</p>
<p id="camera-name-disclosure" class="muted small">
The camera's name is recorded in your report so a reviewer can see
which device was opened. On Apple devices that name often contains
your own, for example "Alex's iPhone". CodeTrial opens whichever
camera your browser treats as the default, so change that default
in your browser or system settings before starting if you would
rather it did not.
</p>
<div class="audio-check-actions">
<button id="camera-skip" class="pill-button" type="button" hidden>
Continue without camera
</button>
</div>
</div>
<div class="audio-check-step" id="audio-step-examples">
<p>
<label for="hide-examples">
<input type="checkbox" id="hide-examples" />
Hide the worked examples
</label>
</p>
<p class="muted small">
The Problem tab shows the scenario without Example 1 and 2, so the
cases you walk through in the Example step are your own.
</p>
</div>
<!-- Decided here, not in the sidebar: it changes which tracks the
interview publishes, so it has to be settled before the room
starts. -->
<div class="audio-check-step" id="audio-step-meet">
<p>
<label for="meet-presentation">
<input type="checkbox" id="meet-presentation" />
I will present this interview in Google Meet
</label>
</p>
<p class="muted small">
CodeTrial hands the camera to Meet after this check and stops
watching it, so camera integrity is off for this interview and the
report says so. Your microphone stays with CodeTrial.
</p>
</div>
<!-- Hidden unless the server says it records. Shown here rather than
in the sidebar for the same reason the Meet checkbox is: it has
to be settled before the room starts, because consent is written
down before any recording can begin. -->
<div class="audio-check-step" id="recording-consent-step" hidden>
<p>
<label for="recording-consent">
<input type="checkbox" id="recording-consent" />
I agree to this interview being recorded
</label>
</p>
<p id="recording-consent-disclosure" class="muted small">
Your camera, microphone, and this page are recorded to one video
file. It is shared with the verified email address on your GitHub
account, as a read-only link, and both the link and the file are
deleted 24 hours later. You can withdraw consent during the
interview: recording stops and the file is scheduled for deletion.
Anything already downloaded by someone who had the link is outside
CodeTrial's control and cannot be recalled.
</p>
</div>
<p id="audio-check-status" class="muted small" role="status">
Starting camera and microphone...
</p>
<div class="audio-check-actions">
<button id="audio-check-leave" class="pill-button" type="button">
Back to lobby
</button>
<button
id="audio-check-join"
class="start-button"
type="button"
disabled
>
Start interview
</button>
</div>
</div>
</section>
<!-- Centred over the page while the interviewer is still thinking, then
gone on a timer. `role="status"` rather than `alert` because it is an
offer, not a fault, and deliberately not a modal dialog: focus stays
in the editor, so a candidate already typing is never interrupted. -->
<div
id="framework-hint"
class="overlay framework-hint"
hidden
role="status"
aria-live="polite"
>
<div class="framework-hint-card">
<p id="framework-hint-title" class="framework-hint-title"></p>
<div id="framework-hint-body" class="framework-hint-body"></div>
</div>
</div>
<section id="ending-overlay" class="overlay" hidden>
<div class="spinner"></div>
<p id="ending-title">Jim is writing up your evaluation...</p>
<p id="ending-detail" role="status" aria-live="polite">
Scoring your code and communication - this usually takes a few
seconds.
</p>
<!-- A spinner says "something is happening"; only a number says
"something is still happening". A candidate watching a report that
never came had no way to tell it apart from one that was nearly
ready, and closed the tab. -->
<p id="ending-elapsed" class="ending-elapsed"></p>
<button id="leave-room" class="pill-button" type="button" hidden>
Taking too long? Leave the room
</button>
<button id="retry-report" class="pill-button" type="button" hidden>
Retry report
</button>
<button id="force-report" class="pill-button" type="button">
Show offline summary
</button>
</section>
<!-- Floats over the editor's top-right rather than sitting in the
sidebar, which was already carrying the problem, the timer, the
status pill, the captions and the controls. Jim is here to be looked
at while the candidate works, so he goes where their eyes already
are, and the stage never takes pointer events off the editor. -->
<aside id="jim-stage" class="jim-stage">
<!-- data-avatar-state is the fallback contract: only "ready" shows
the canvas, every other value shows the neutral panel below it.
web/avatar/avatar.js owns the value; the CSS owns what it looks
like. -->
<div id="jim-avatar" class="jim-avatar" data-avatar-state="loading">
<p id="jim-avatar-fallback" class="jim-avatar-fallback">
<span class="jim-avatar-initial" aria-hidden="true">J</span>
<span id="jim-avatar-note" class="muted small" tabindex="-1"
>Jim is here by voice.</span
>
</p>
</div>
<button
id="hide-avatar"
class="pill-button hide-avatar"
type="button"
hidden
>
Hide avatar
</button>
<!-- Announces only the automatic turn-off. A live region over the
whole mount announced the canvas arriving and the preflight-time
"unavailable", and a manual Hide already moves focus to the note. -->
<span
id="jim-avatar-status"
class="visually-hidden"
role="status"
></span>
<!-- Jim's subtitles belong under Jim's face, not across the room in the
sidebar: the candidate is already looking here when he speaks. -->
<div class="turn-row">
<!-- Fills while the candidate is silent and resets when they speak,
so the moment Jim takes the turn is visible before it comes.
Clicking it hands the turn over now. -->
<button
id="turn-ring"
class="turn-ring"
type="button"
aria-label="Your turn is done"
title="Jim replies when this fills. Click to let him reply now."
hidden
></button>
<p id="turn-status" class="muted small" role="status">
Take your time. Choose Your turn is done (Alt+Enter) to let Jim
reply early.
</p>
</div>
<div
id="captions-bar"
class="captions-bar"
aria-live="polite"
aria-label="Real-time closed captions"
>
<span class="captions-label">Live CC:</span>
<span id="captions-text">Listening...</span>
</div>
</aside>
<section id="report-modal" class="overlay" hidden></section>
<video
id="camera-integrity-video"
class="hidden-media"
muted
playsinline
></video>
</main>
</body>
</html>