8000 feat(setup): apps and AI assistants as an optional setup wizard step by adeelahmad · Pull Request #109 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(setup): apps and AI assistants as an optional setup wizard step - #109

Merged
adeelahmad merged 5 commits into
mainfrom
claude/project-thread-icgrqy
Oct 4, 2026
Merged

adeelahmad merged 5 commits into
mainfrom
claude/project-thread-icgrqy

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: OAuth sign-in for apps and MCP clients (#18) was always on. It had no place in the setup wizard and no switch.

After: the setup wizard has an optional Apps and AI step, placed between Storage and Telemetry. It asks whether apps and AI assistants (Claude, ChatGPT, Cursor and other MCP clients) may sign people in with their Lens account and how long their tokens last. It also shows the MCP server address with a Copy button. Skipping the step keeps OAuth on, as before. Admins can also flip the new switch in Settings → API keys.

How:

  • New setting tokens.oauth_enabled, default true.
  • With it off, /.well-known/oauth-* returns 404, and register, authorize and token return 403. A 401 says a plain Bearer with no resource metadata, and lo_ tokens stop working.
  • Grants are kept while it's off, so turning it back on restores them, and people can still list and revoke them.
  • GET /api/v1/setup now reports oauth, and PUT /api/v1/setup/oauth saves it.
  • The OpenAPI schema and the client are regenerated, and the docs and changelog are updated.

Motivation and Context

Adeel asked for OAuth to be part of the setup wizard as an optional step.

Steps to reproduce (if appropriate):

cd fastapi_backend && uv run pytest tests/api/test_setup.py tests/api/test_oauth.py; cd nextjs-frontend && pnpm exec jest __tests__/setupWizard.test.tsx.

Checked in a cloud container:

  • eslint, tsc and prettier are clean, and all 646 frontend tests pass.
  • The backend suite has 500 passing. The 1 failure is test_conversion.py::test_office_and_text_files_become_documents, which also fails on main there because of how LibreOffice is installed.
  • ruff on the changed files is clean.
  • mypy reports 3 errors in deps.py:322, and main reports the same 3 there.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires documentation updates.
  • I have updated the documentation accordingly.
  • My change requires dependencies updates.
  • I have updated the dependencies accordingly.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HFiySoDnqG9PX5c3WLPz5C


Generated by Claude Code

The setup wizard gets an Apps and AI step: whether apps and AI assistants
(MCP clients) may sign people in with their Lens account through OAuth, how
long their tokens last, and the MCP server's address to copy. Skipping it
keeps OAuth on, as before.

New setting tokens.oauth_enabled (on by default; Settings -> API keys).
Off, discovery answers 404, apps can't register, ask or renew, 401s stop
naming resource metadata and lo_ tokens don't work; grants are kept, so
turning it back on restores them, and people can still revoke them.
API: PUT /api/v1/setup/oauth; GET /api/v1/setup reports oauth.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HFiySoDnqG9PX5c3WLPz5C
@adeelahmad adeelahmad self-assigned this Oct 4, 2026
claude added 4 commits October 4, 2026 04:42
Also sorts an import and formats two Fedora test files that main's
pre-commit run (ruff, ruff format) rejects.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HFiySoDnqG9PX5c3WLPz5C
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HFiySoDnqG9PX5c3WLPz5C
Main's mypy run fails on deps._proxy_hosts (getaddrinfo's address tuple
may hold an int); this makes CI pass here.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HFiySoDnqG9PX5c3WLPz5C
@adeelahmad
adeelahmad merged commit fe41872 into main Oct 4, 2026
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.

2 participants

0