Skip to content

Fix failing ktlintCheck on main and unify sign-in flow-meta error logging#10

Merged
brionmario merged 1 commit into
thunder-id:mainfrom
UdeshAthukorala:fix/signin-logging-followup
Jul 15, 2026
Merged

Fix failing ktlintCheck on main and unify sign-in flow-meta error logging#10
brionmario merged 1 commit into
thunder-id:mainfrom
UdeshAthukorala:fix/signin-logging-followup

Conversation

@UdeshAthukorala

@UdeshAthukorala UdeshAthukorala commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

A small follow-up on the sign-in flow.

  • The flow-meta fetch in BaseSignIn was logging the raw exception object. I switched it to the same diagnosticLabel(e) helper the rest of the sign-in flow already uses, so the log line stays compact and consistent (typed error code / exception class name) instead of dumping the full exception.
  • The sign-in flow components that came in with the federated-options work weren't formatted for the ktlint engine we pin (1.8.0), so ktlintCheck was failing on main. I ran the formatter over them — when-entry braces and blank lines between multiline when conditions, plus one trailing comma in FlowTemplateResolver. Formatting only, no behaviour change.

Verified locally:

  • ./gradlew ktlintCheck is clean (it was red on main before this)
  • ./gradlew build passes (lint included)
  • all 28 unit tests pass

Summary by CodeRabbit

  • Refactor
    • Improved internal code formatting and readability across sign-in flow handling.
    • Standardized action and component rendering structures without changing visible behavior.
    • Enhanced diagnostic information in sign-in flow warnings.
    • Reformatted template resolver declarations without changing functionality.

- Log flow-meta fetch failures through the shared diagnostic label, matching
  the rest of the sign-in flow rather than passing the raw exception.
- Bring the merged sign-in flow components into ktlint 1.8.0 compliance
  (when-entry braces and blank lines between multiline when-conditions).
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Sign-in and formatting updates

Layer / File(s) Summary
Sign-in dispatch and failure logging
src/main/kotlin/dev/thunderid/compose/components/presentation/auth/SignIn.kt
Rendering when branches were reformatted without changing behavior; flow meta fetch warnings now include diagnosticLabel(e).
Template resolver declaration formatting
src/main/kotlin/dev/thunderid/compose/i18n/FlowTemplateResolver.kt
The constructor declaration was reformatted without changing its parameter or template-resolution logic.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: brionmario

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately summarizes the ktlint formatting fix and shared error-logging change.
Description check ✅ Passed The description covers the main change, approach, and validation, though it does not use the template's headings or checklist items.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@UdeshAthukorala UdeshAthukorala changed the title Tidy sign-in flow logging and ktlint formatting Fix failing ktlintCheck on main and unify sign-in flow-meta error logging Jul 15, 2026
@brionmario
brionmario merged commit b8262f8 into thunder-id:main Jul 15, 2026
6 checks passed
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.

3 participants