Skip to content

feat(auth): dev-gated password login + MCP-driven CCW agent workflow #86exrkrra#28

Merged
navidshad merged 3 commits into
devfrom
claude/jovial-pascal-7c8a59
Jun 2, 2026
Merged

feat(auth): dev-gated password login + MCP-driven CCW agent workflow #86exrkrra#28
navidshad merged 3 commits into
devfrom
claude/jovial-pascal-7c8a59

Conversation

@navidshad

@navidshad navidshad commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

🏷️ PR Title:
feat(auth): add dev-gated password login + MCP-driven CCW agent workflow

📋 Summary

This PR introduces a development-gated password login feature and implements an MCP-driven CCW agent workflow, enhancing authentication processes and agent task management.

🔗 Related Tasks

#86exrkrra - Add dev-gated password login and MCP-driven CCW agent workflow

📝 Additional Details

The changes focus on improving security and workflow automation for agents, tailored for development environments and integrated with MCP triggers.

📜 Commit List

b4b6e46 feat(auth): add dev-gated password login + MCP-driven CCW agent workflow
cbc26fd chore(release): 1.12.0 [skip ci]
a271aff Merge pull request #27 from codebridger/dev

navidshad and others added 3 commits May 26, 2026 11:49
Enhance Practice Now Features and Save Modal Improvements with Dashboard Deep-Linking
# [1.12.0](v1.11.2...v1.12.0) (2026-05-26)

### Bug Fixes

* **save-modal:** break circular import to console-crane store ([ab00130](ab00130))
* **save-modal:** refetch bundle options so post-save chip shows title ([25499da](25499da))

### Features

* announce extension presence on dashboard origins for install nudge [#86](https://github.com/codebridger/subturtle-extension-apps/issues/86)exkh0z3 ([69dcf1b](69dcf1b)), closes [#86exkh0z3](https://github.com/codebridger/subturtle-extension-apps/issues/86exkh0z3)
* **console-crane:** practice + flashcard-preview pages, near-translation actions ([224b9da](224b9da))
* **practice-now:** emphasize practiced phrase + cover login flows ([8ff3408](8ff3408))
* **practice-now:** open config to logged-out users + clearer CTAs ([2f09e05](2f09e05))
* **practice-now:** voice session config + dashboard deep-link ([db1a3fc](db1a3fc))
* **save-modal:** chunk highlights, AI advice chat, bundle suggestion ([9954c22](9954c22))
* **save-modal:** in-field bundle chips with dirty-aware save + inline removal ([374cbb4](374cbb4))
* **save-modal:** per-chunk definitions, merged pronunciation, reorder save ([f766040](f766040))
* **saved-phrase:** DB-first lookup, reuse stored translation, no AI re-call ([1315cc8](1315cc8))
Unblocks cloud Claude agents (Claude Code on the Web) from developing on
the extension by adding a username/password login path that doesn't need
Google OAuth, plus a chrome-extension-tester-mcp config so the agent can
load the unpacked extension, drive the popup, and screenshot results.

The new email/password form in LoginView is build-flag gated by
ENABLE_PASSWORD_AUTH. Stable + dev release builds keep it off (form stays
hidden, real users continue to use OAuth); CCW + verify-job builds enable
it. The flow reuses the existing handleTokenLogin path so the JWT lands
in chrome.storage.sync["token"] indistinguishable from an OAuth token —
no downstream consumer (modular-rest client, profile store, translate
service, ConsoleCrane) sees the difference.

Coverage:
- tests/login-password.test.ts + login-password-disabled.test.ts —
  Vitest, form rendering / validation / success+failure paths.
- tests/e2e/password-login.spec.ts — Playwright, end-to-end against
  stubbed /user/login and /verify/token via the existing fixture.

The agent path uses only the MCP; tests/e2e/ stays the testing ground
and the two share no code. CLAUDE.md documents the one-time CCW setup
(network access, env vars, setup script) plus the curl + token-inject
sequence — including the gotcha that the password must be base64-encoded
in the /user/login body since modular-rest's client lib does this
internally and raw curl doesn't.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@navidshad

Copy link
Copy Markdown
Collaborator Author

@navidshad navidshad changed the title feat(auth): dev-gated password login + MCP-driven CCW agent workflow feat(auth): dev-gated password login + MCP-driven CCW agent workflow #86exrkrra Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

Automated PR Review

Primary Task: CU-86exrkrra — Implement an headless environment for agentic development


Task alignment

Requirement Status Notes
Username/Password auth (no Google OAuth dependency) LoginView.vue adds a build-gated email+password form calling authentication.login(). Stable/prod builds keep ENABLE_PASSWORD_AUTH=false, preserving Google-only auth for real users.
Headless browser with screenshot capability .mcp.json configures chrome-extension-tester-mcp; CLAUDE.md documents take_screenshot and 13 other MCP tools.
Headless browser with extension install + popup access MCP tools load_extension and interact_with_popup cover this; extension_storage enables token injection without the UI.
Agent guide on the repo CLAUDE.md gains a thorough "Cloud agent workflow" section: one-time CCW env setup, env vars, setup script, full login→screenshot loop, local dev fallback, and boundary note (MCP vs. Playwright fixture).

All four task requirements are addressed in this PR.


Commit messages

  • b4b6e46 feat(auth): add dev-gated password login + MCP-driven CCW agent workflow — ✅ Type matches impact, scope is clear, description is self-contained.
  • cbc26fd chore(release): 1.12.0 [skip ci] — ✅ Semantic-release automation commit; correct type and [skip ci] guard.
  • a271aff Merge pull request #27 from codebridger/dev — informational history commit from a prior merge; no action needed.

Prior review follow-up

No prior reviews or requested changes on this PR.


Convention check

  • Build-time env flag (process.env.ENABLE_PASSWORD_AUTH === "true" as a module-level const) — correct pattern for dotenv-webpack compile-time substitution. ✅
  • .env.example updated with ENABLE_PASSWORD_AUTH= — dotenv-webpack safe: true won't break future builds. ✅
  • CI verify job gets ENABLE_PASSWORD_AUTH=true; release build gets ENABLE_PASSWORD_AUTH=false — both heredocs updated. ✅
  • No code-splitting — password form is embedded in existing LoginView.vue (popup bundle); no new router lazy-import introduced. ✅
  • Test file conventions*.test.ts for Vitest unit, *.spec.ts under tests/e2e/ for Playwright; new files follow both patterns. ✅
  • Security — error messages are generic (no email-existence leak); password field cleared on cancel and after successful login; email retained for UX convenience — all intentional and documented by the test coverage. ✅
  • Minor / non-blocking: .mcp.json pins chrome-extension-tester-mcp@^2.1 (range, not exact). A patch/minor bump could silently change tool behaviour. Consider pinning to an exact version once the MCP is stable, or note it as a known trade-off in CLAUDE.md.

Verdict

APPROVE

Implementation fully satisfies the task requirements. Code is well-structured, security trade-offs are sound, test coverage is thorough (unit flag-on/flag-off + E2E success/failure paths), and the CLAUDE.md agent guide is detailed enough for a cold-start agent to use without extra context.


Generated by Claude Code

@navidshad navidshad merged commit 2770f37 into dev Jun 2, 2026
3 checks passed
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.13.0-dev.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.13.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants