Skip to content

feat(auth-service): show current handle on account settings page - #99

Merged
aspiers merged 3 commits into
mainfrom
hyper-small-scenarios
Apr 20, 2026
Merged

feat(auth-service): show current handle on account settings page#99
aspiers merged 3 commits into
mainfrom
hyper-small-scenarios

Conversation

@aspiers

@aspiers aspiers commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a "Current Handle:" row to the /account settings page, resolved from the PDS via com.atproto.repo.describeRepo. The row displays the authoritative handle and gracefully falls back to (unknown) if the PDS describeRepo call fails.
  • Un-pends the User changes their handle scenario in features/account-settings.feature. Its step definitions already existed (introduced alongside PR test(e2e): implement welcome OTP email scenario (email-delivery) #91's account-settings E2E work) and asserted that the page shows Current Handle: — the missing UI on the server side is what was keeping the scenario gated.
  • Removes the stale "Known gap: handle update on /account is not implemented yet" comment — the POST /account/handle route has been in place for a while; what was actually missing was the display, not the update.

Also includes a changeset describing the user-visible change.

Test plan

  • pnpm typecheck passes
  • pnpm format:check / pnpm lint pass
  • pnpm test — all 443 unit tests pass
  • pnpm test:e2e --dry-run features/account-settings.feature shows no undefined/ambiguous steps
  • E2E on Railway preview: User views their account information now shows the handle row; User changes their handle runs end-to-end (handle rename → settings reflect it → resolveHandle returns expected DID)
  • Visual check of the settings page handle row (reviewer)

🤖 Generated with Claude Code

@claude claude 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.

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, reopen this pull request to trigger a review.

@changeset-bot

changeset-bot Bot commented Apr 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9cfe280

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Apr 20, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
epds-demo Ready Ready Preview, Comment Apr 20, 2026 7:57pm

Request Review

@coderabbitai

coderabbitai Bot commented Apr 20, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@aspiers has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 59 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 3 minutes and 59 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7b746ff3-2d41-49ec-9ec3-9fd74bb3f2f0

📥 Commits

Reviewing files that changed from the base of the PR and between e35ea6f and 9cfe280.

📒 Files selected for processing (5)
  • .changeset/show-current-handle-on-settings.md
  • features/account-settings.feature
  • packages/auth-service/src/__tests__/get-handle-by-did.test.ts
  • packages/auth-service/src/lib/get-handle-by-did.ts
  • packages/auth-service/src/routes/account-settings.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hyper-small-scenarios

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@railway-app

railway-app Bot commented Apr 20, 2026

Copy link
Copy Markdown

🚅 Deployed to the ePDS-pr-99 environment in ePDS

Service Status Web Updated (UTC)
@certified-app/auth-service ✅ Success (View Logs) Web Apr 20, 2026 at 7:30 pm
@certified-app/demo untrusted ✅ Success (View Logs) Web Apr 20, 2026 at 7:13 pm
@certified-app/pds-core ✅ Success (View Logs) Web Apr 20, 2026 at 7:12 pm
@certified-app/demo ✅ Success (View Logs) Web Apr 20, 2026 at 7:11 pm

@coveralls-official

coveralls-official Bot commented Apr 20, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 24687298539

Coverage increased (+0.2%) to 37.013%

Details

  • Coverage increased (+0.2%) from the base build.
  • Patch coverage: 1 uncovered change across 1 file (8 of 9 lines covered, 88.89%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
packages/auth-service/src/routes/account-settings.ts 1 0 0.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 2044
Covered Lines: 784
Line Coverage: 38.36%
Relevant Branches: 1190
Covered Branches: 413
Branch Coverage: 34.71%
Branches in Coverage %: Yes
Coverage Strength: 3.2 hits per line

💛 - Coveralls

aspiers and others added 3 commits April 20, 2026 19:56
Adds a "Current Handle:" row to the /account settings page, resolved
from the PDS via com.atproto.repo.describeRepo. This lets users see
their authoritative handle before using the update form.

Also un-pends the previously-@pending "User changes their handle"
scenario in account-settings.feature — its step definitions already
existed but expected the settings page to display the current handle,
which it didn't. Removes the stale "handle update on /account is not
implemented yet" comment now that the handle-change flow is testable
end-to-end.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The describeRepo lookup was added inline in the account-settings GET
handler in the previous commit, which dragged coverage down by ~0.2%
without giving the error paths any unit test. Move it into
packages/auth-service/src/lib/get-handle-by-did.ts (matching the
shape of lib/get-did-by-email.ts) and cover the happy path plus all
the null-returning branches (non-string handle, non-OK responses,
404, 500, network error, timeout, malformed JSON).

Pure refactor — no behaviour change on the settings page.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Silences SonarCloud "insecure http protocol" hotspot on the test
constant. The URL is mocked — never dialled — so scheme is cosmetic.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@aspiers
aspiers force-pushed the hyper-small-scenarios branch from a5e243c to 9cfe280 Compare April 20, 2026 19:56
@railway-app
railway-app Bot temporarily deployed to ePDS / ePDS-pr-99 April 20, 2026 19:57 Destroyed
@sonarqubecloud

Copy link
Copy Markdown

@aspiers
aspiers merged commit cbf8053 into main Apr 20, 2026
13 of 14 checks passed
@aspiers
aspiers deleted the hyper-small-scenarios branch April 20, 2026 20:05
aspiers added a commit that referenced this pull request Apr 20, 2026
On pull_request, `actions/checkout`'s default is the GitHub-synthesized
merge commit (refs/pull/N/merge = base + head). Railway, however, deploys
the PR branch head — Railway has no native way to deploy merge commits
(https://docs.railway.com/deployments/github-autodeploys).

The mismatch means when main advances between rebases, E2E test code
from the merge commit can assert against UI/behaviour that exists in
main but not yet in the PR branch's Railway deployment. Symptom: tests
newly added on main fail on unrelated PRs until the PR is rebased
(e.g. the "Current Handle:" row introduced by #99 broke #93's CI).

Pin checkout to `github.event.pull_request.head.sha` so test code and
deployed runtime share one SHA. Empty on push / workflow_dispatch falls
back to actions/checkout's default (GITHUB_SHA for the triggering
event), verified against the v6.0.2 source.

Trade-off: PR CI no longer catches main-incompatibilities until the
branch is rebased, but rebase was the mitigation anyway — this just
makes the contract explicit instead of surfacing as confusing
unrelated failures.
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