Skip to content

feat: network monitor, rate limiting, profile stats & UI/perf fixes#3

Open
Piyush-Thakkarr wants to merge 1 commit into
mainfrom
feat/ui-perf-fixes
Open

feat: network monitor, rate limiting, profile stats & UI/perf fixes#3
Piyush-Thakkarr wants to merge 1 commit into
mainfrom
feat/ui-perf-fixes

Conversation

@Piyush-Thakkarr
Copy link
Copy Markdown
Collaborator

Summary

  • NetworkMonitor: New NWPathMonitor-based utility with offline banner in MainAppView
  • Gemini rate limiting: 2-second cooldown between API requests with user-facing error
  • Profile stats: Total notes and total words count in ProfileView via SwiftData
  • Email validation: @ and . check on sign-in and sign-up flows
  • Adaptive sidebar: CodeWorkspace sidebar uses minWidth:160, idealWidth:200, maxWidth:260
  • AI HTML wrapping: AI responses wrapped in <p> tags before injecting into RichTextEditor
  • RichTextEditor optimization: lastSetHTML cache skips redundant HTML→attributed conversions
  • filteredNotes memoization: Key-based cache avoids recomputing on every SwiftUI render
  • iPad multi-window fix: Share sheet uses foregroundActive scene + isKeyWindow
  • FormattingToolbar feedback: Haptic warning when applying format with no text selected
  • Keyboard shortcut: Cmd+S save in NoteEditorView
  • SwiftData migration: Added migration strategy comment for future schema changes

Test plan

  • Build succeeds (verified)
  • All 48 tests pass (verified)
  • Toggle airplane mode → verify offline banner appears/disappears
  • Send 2 rapid AI requests → verify rate limit message shows
  • Open Profile → verify note count and word count display
  • Try signing in with invalid email → verify validation error
  • Rotate iPad / use split view → verify sidebar adapts and share sheet doesn't crash
  • Use AI Replace/Append → verify HTML renders correctly in editor

…tion, and UI/perf fixes

Adds NetworkMonitor for offline banner, Gemini API rate limiting, profile note/word stats,
email validation on auth, adaptive sidebar width, HTML-wrapped AI responses, RichTextEditor
caching, filteredNotes memoization, iPad multi-window share sheet fix, and keyboard shortcuts.
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