Skip to content

fix(desktop): make manual sign-in recovery discoverable - #5106

Open
yomgui wants to merge 2 commits into
devfrom
fix/signin-code-field-label
Open

yomgui wants to merge 2 commits into
devfrom
fix/signin-code-field-label

Conversation

@yomgui

@yomgui yomgui commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Makes the desktop activation fallback discoverable: the existing field now says Workspace address or sign-in code, explains that the browser’s full OpenWork link is required, and offers Sign-in didn’t come back? Paste the code from the browser after browser sign-in starts. The recovery action focuses and selects the same field. Includes all ten supported locales and a self-hosting guide with current Account and activation recovery steps.

This does not fix or establish a corporate callback, proxy, TLS, or network root cause. Manual handoff still needs the configured Den web/API endpoints; network diagnosis remains a separate investigation. It does not change grant parsing, origin confirmation, or the exchange transaction.

The discoverability issue is that activation already parses full openwork://den-auth links, but its old “Workspace address” label hid that capability. Account already exposes Paste sign-in code → Sign-in link or one-time code → Finish sign-in and also accepts a raw code for its configured server. Activation requires the full link with the destination origin.

Verification

Passed — changed desktop journey on the current head. Isolated local testkit Electron, fresh enterprise profile; external-browser launches captured by the existing test witness. Local fallback selected because a Daytona API credential was unavailable in the execution environment.

OPENWORK_EVAL_E2E_TESTS=1 pnpm --dir evals exec vitest run --config vitest.config.ts --project e2e specs/signin-code-discovery.e2e.test.ts
pnpm --filter @openwork/app typecheck
  • Desktop spec: exit 0; 1 passed, 0 failed, 0 skipped. Five evidence expectations passed, including three visual validations; zero unvalidated or pending artifacts.
  • Assertions cover accessible field labeling/helper, absence of premature recovery, browser-waiting recovery, focus and full selection, and manual origin confirmation instead of another browser launch. Confirmation does not render the grant.
  • App typecheck: exit 0.
  • Broader pnpm --dir evals exec tsc --noEmit: fails with existing cross-project ImportMeta.env, desktop-global declaration, and Bun-type errors. The same command reproduces those signatures in a clean origin/dev control at 6f443f351; this is not presented as a passing check.
  • Test scope ends at manual origin confirmation; it does not claim successful authentication against a real deployment or reproduction of a corporate network failure.

Current-head test evidence — all five expectations passed. Design rules: P3 (recovery appears after browser sign-in), P5/S6 (existing Button/input and handoff path), C6 (actionable recovery), P10 (real isolated desktop screenshots).

Screenshots

Before — enterprise activation, full-link recovery hidden behind “Workspace address”.

Before: enterprise activation field

After — enterprise activation waiting for the browser, with the renamed field, full-link helper, and recovery action.

After: browser-return recovery

Signed-off-by: Guillaume Loret <guillaume@openworklabs.com>
Signed-off-by: Guillaume Loret <guillaume@openworklabs.com>
@mintlify

mintlify Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
differentai 🟢 Ready View Preview Sep 17, 2026, 1:13 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 17, 2026 1:13pm UTC
openwork-den Ready Ready Preview Sep 17, 2026 1:13pm UTC
openwork-diagnostics Ready Ready Preview Sep 17, 2026 1:13pm UTC
openwork-landing Ready Ready Preview, v0 Sep 17, 2026 1:13pm UTC

@yomgui

yomgui commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator Author

Selected evidence: Incomplete · 12/12 tests · 18/18 assertions · 8 images

Commit 67abcccd47fd98e8247c0f8660b556b72c86c66c · selected evidence
Required verification is reported separately by the current-head Required verification check.

Open review report

Coverage gaps: Required verification: incomplete. Selected evidence does not satisfy all required specs. No authenticated current-head required plan is available.


export default {
"den.workspace_address_or_code": "Dirección del espacio de trabajo o código de inicio de sesión",
"den.workspace_code_hint": "Para un código de inicio de sesión, pega el enlace completo de OpenWork copiado del navegador, incluida la dirección del espacio de trabajo.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Default activation surface adds explanatory helper prose

The new sign-in-code hint explains how the interface works in the default viewport; remove the paragraph or move the detail behind progressive disclosure.

Evidence
  • enterprise-activation-gate.tsx renders t("den.workspace_code_hint") in a visible <p> beneath the activation input.
  • The localized string explains that users must paste a full browser-copied OpenWork link, matching DESIGN.md P1's prohibited helper-paragraph pattern.
Also found at 1 additional location
  • apps/app/src/i18n/locales/vi.ts:8

Identified by Warden · design-spec-review · TR7-G5E

export default {
"den.workspace_address_or_code": "Địa chỉ không gian làm việc hoặc mã đăng nhập",
"den.workspace_code_hint": "Để dùng mã đăng nhập, hãy dán toàn bộ liên kết OpenWork đã sao chép từ trình duyệt, bao gồm địa chỉ không gian làm việc.",
"den.signin_return_help": "Đăng nhập không quay lại ứng dụng? Dán mã từ trình duyệt",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C1: Recovery action is not verb-first

The recovery button begins with a question rather than an outcome-specific verb; use a label such as “Paste browser sign-in code.”

Evidence
  • The new den.signin_return_help value is rendered as the visible button label when waitingForBrowser is true.
  • Its text starts with “Sign-in didn’t come back?” and only then presents “Paste,” so the action is not verb-first.
  • The button’s click handler focuses and selects the activation field for the paste action.
Also found at 1 additional location
  • apps/app/src/react-app/domains/cloud/enterprise-activation-gate.tsx:249-254

Identified by Warden · design-spec-review · Q2K-349

@github-actions

Copy link
Copy Markdown
Contributor

Required verification: waiting. Selected evidence is separate.

Missing required specs: app-smoke.e2e.test.ts, cross-server-handoff-atomic-commit.e2e.test.ts, desktop-policy-restricted-mode.e2e.test.ts, org-team-lifecycle-critical-path.e2e.test.ts, signin-code-discovery.e2e.test.ts.

Required journey jobs

Commit 67abcccd47fd98e8247c0f8660b556b72c86c66c

Scope: critical and changed spec files; excluded and manual dispositions are not passing coverage.

@github-actions

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 3. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (85125 ms), confidentiality-review (40726 ms), spec-provenance-review (91310 ms), desktop-den-sync-review (110679 ms), design-spec-review (208867 ms).

Blockers

  • None.

Advisories

  • TR7-G5E · medium · design-spec-review · apps/app/src/i18n/locales/es.ts:8
  • Q2K-349 · medium · design-spec-review · apps/app/src/i18n/locales/vi.ts:9
  • K7Z-P9Q · low · design-spec-review

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 1
  • Distinct heads in retained window: 1
  • Current unresolved Warden threads: 2 of 2 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 2
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 1/20 run attempts retained; truncated: false
  • Transition snapshot: 2/2 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (67abcccd47fd98e8247c0f8660b556b72c86c66c). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant