Skip to content

feat(design): phase 0 polish — code review fixes + Liquid Glass#1

Merged
renatobardi merged 9 commits into
mainfrom
feat/phase-0-glass
May 31, 2026
Merged

feat(design): phase 0 polish — code review fixes + Liquid Glass#1
renatobardi merged 9 commits into
mainfrom
feat/phase-0-glass

Conversation

@renatobardi

Copy link
Copy Markdown
Owner

What

  • 10 code review findings resolved: PKCE nonce flow, CI pipefail, Keychain SecItemDelete attrs, signOut ordering, restoreSession async, deprecated .cornerRadius, redundant build step
  • KuraAdaptiveBackground: fundo canônico adaptativo — glass (macOS 26+), MeshGradient sutil (macOS 15–25), solid (macOS 14)
  • GlassEffectContainer + .glassEffect(.regular.interactive()) nos botões de sign-in e sign-out
  • SymbolEffect em todos os SF Symbols interativos (macOS 14+, sem availability guard)
  • AppDelegate: popover.appearance = nil no macOS 26 para chrome glass automático
  • CLAUDE.md atualizado: Fase 0 em 99%, guidelines de Liquid Glass integradas ao plano

Why

Fase 0 estava com o fluxo de auth quebrado para ativação do Firebase (nonce nunca setado no request), CI sempre verde independente de falhas, e sem adoção do design language do macOS 26. Estas mudanças trazem a fundação para qualidade de produção enquanto aguarda aprovação da conta Apple Developer.

How

  • AuthManager.completeSignIn(authorization:rawNonce:) centraliza toda lógica pós-auth; startSignInWithApple() e o delegate morto foram removidos
  • KuraAdaptiveBackground é o único ponto de decisão de fundo por versão de OS e accessibility
  • Glass aplicado exclusivamente na camada de navegação seguindo guidelines Apple (nunca em conteúdo)
  • Todos os paths de glass guardam @Environment(\.accessibilityReduceTransparency)

renatobardi and others added 9 commits May 31, 2026 15:41
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- restructure sign-in: LoginView sets PKCE nonce on request, delegates to
  AuthManager.completeSignIn(authorization:rawNonce:)
- remove dead startSignInWithApple() and ASAuthorizationControllerDelegate
- restoreSession() now async via Task.detached, unblocks main thread at launch
- signOut() ensures appleUserID deletion always runs independently
- KeychainHelper.SecItemDelete uses clean query without write-only attributes
- KeychainHelper save() and delete() return Void — throws signals failure
- AppDelegate popover size uses KuraLayout constants instead of literals
- CI: remove redundant build step, add set -o pipefail, remove || true

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
  - KuraAdaptiveBackground: canonical background view — glass (macOS 26+),
    MeshGradient ambient (macOS 15-25), solid dark (macOS 14)
  - AppDelegate: popover.appearance = nil on macOS 26 to unlock automatic
    Liquid Glass chrome on NSPopover
  - RootView: use KuraAdaptiveBackground instead of solid kuraBackground
  - LoginView: GlassEffectContainer + .glassEffect(.regular.interactive())
    on sign-in button; .symbolEffect(.pulse.byLayer) on sparkles icon
  - DashboardView: GlassEffectContainer + .glassEffect on header;
    .symbolEffect(.variableColor.iterative) on sparkles;
    .symbolEffect(.bounce, value:) on sign-out button
  - All glass paths guard accessibilityReduceTransparency and
    fall back to solid dark following Apple guidelines

  Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- LoginView: remove glassEffect/clipShape glass overlay from the official
  SignInWithAppleButton (Apple HIG: button appearance must not be altered)
- accessibility: gate all continuous animations (.pulse, .variableColor, mesh)
  on accessibilityReduceMotion AND popover visibility — no animation runs while
  the popover is hidden, honoring CLAUDE.md reduce-motion mandate
- auth: move nonce from fragile LoginView @State into AuthManager singleton via
  prepareSignInRequest; completeSignIn logs + aborts on missing nonce instead
  of silently dropping a successful authorization
- RootView: .unknown state shows branded sparkles instead of blank/transparent
  popover during async Keychain restore
- DashboardView: restore header/content divider on non-glass paths; centralize
  glass via reusable .kuraGlass() modifier + KuraGlass.isActive
- AppDelegate: remove no-op popover.appearance = nil; add NSPopoverDelegate to
  track visibility for animation pausing
- Theme: KuraMeshBackground uses Color.kuraAccent token instead of raw RGB
- AuthManager.randomNonce: full alphabet + rejection sampling (no modulo bias)
- new PopoverVisibility observable drives animation pausing

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Theme: KuraGlassModifier now reuses KuraGlass.isActive for the transparency
  rule (single source of truth); only the #available stays lexical
- AuthManager.randomNonce: batch SecRandomCopyBytes per pass instead of one
  syscall per byte; build into [Character] (O(1) count) and convert once
- PopoverVisibility + AppDelegate: mark @mainactor to make the main-thread
  contract explicit (was implicit via AppKit delegate callbacks)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
xcodebuild test fails with 'not configured for test action' because
no XCTest target exists. Build-only until test targets are added (Fase 6).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
glassEffect requires Xcode 26 SDK — #available guards the runtime but the
compiler needs the symbol in the SDK. macos-15 default (Xcode 16) does not
include it. Switch to macos-latest and pick the highest installed Xcode.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@renatobardi
renatobardi merged commit 61eae4a into main May 31, 2026
2 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.

1 participant