v0.7.0 4c16dd8

web-mobile-smoke.cjs RawHistoryFolder

1// Isolated profile only. Device emulation does not emulate a real soft keyboard.
2const { chromium } = require(process.env.PLAYWRIGHT_MODULE || 'playwright');
3const { execFileSync } = require('node:child_process');
4const assert = require('node:assert/strict');
5(async () => {
6  if (!process.env.VEV_BINARY || !process.env.VEV_ENV) throw new Error('VEV_BINARY and isolated VEV_ENV are required');
7  const link = execFileSync(process.env.VEV_BINARY, ['--web-daemon'], { encoding: 'utf8' }).match(/http:\/\/127\.0\.0\.1:8778\/#token=[A-Za-z0-9_-]+/)[0];
8  const browser = await chromium.launch({ executablePath: process.env.CHROMIUM_PATH });
9  try {
10    const page = await browser.newPage({ viewport: { width: 390, height: 844 }, isMobile: true, hasTouch: true });
11    await page.goto(link);
12    await page.waitForFunction(() => document.querySelector('#status').textContent === 'Connected');
13    assert.equal(await page.locator('#select-mode').getAttribute('aria-pressed'), 'true');
14    assert.equal(await page.evaluate(() => document.activeElement.tagName === 'TEXTAREA'), false);
15    for (const id of ['keyboard', 'select-mode', 'palette']) {
16      const bounds = await page.locator('#' + id).boundingBox();
17      assert.ok(bounds.width >= 44 && bounds.height >= 44);
18    }
19    await page.locator('#keyboard').tap();
20    assert.equal(await page.evaluate(() => document.activeElement.tagName), 'TEXTAREA');
21    assert.equal(await page.locator('#select-mode').getAttribute('aria-pressed'), 'false');
22    await page.locator('#select-mode').tap();
23    assert.equal(await page.evaluate(() => document.activeElement.tagName === 'TEXTAREA'), false);
24    await page.setViewportSize({ width: 390, height: 400 });
25    await page.waitForFunction(() => document.querySelector('#workspace').getBoundingClientRect().bottom <= window.innerHeight + 1);
26    assert.equal(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth), true);
27    console.log('Mobile emulation passed: touch targets, explicit keyboard, selection mode, compact viewport.');
28  } finally { await browser.close(); }
29})().catch(error => { console.error(error); process.exitCode = 1; });

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close