Skip to content

Dev#26

Merged
ImaginativeShohag merged 72 commits into
mainfrom
dev
Nov 19, 2025
Merged

Dev#26
ImaginativeShohag merged 72 commits into
mainfrom
dev

Conversation

@ImaginativeShohag
Copy link
Copy Markdown
Owner

No description provided.

Md-Saifullah and others added 30 commits January 9, 2025 19:09
#Conflicts:
#	Targets/Home/Sources/UI/Screens/Home/Model/Screen.swift
…-test-dependency

Update Tuist config for adding test dependency
Updated localizable strings for new features and existing entries across both targets, including version adjustments.
- Add proper error handling in DAOs with throws instead of silent failures
- Update insert/update methods to support createdAt and isCompleted fields
- Fix repository update method to use id instead of entity reference
- Make toggleTodoCompleteStatus async to properly persist changes to DB
- Improve error logging using SuperLog.e for errors instead of debug level
- Add consistent error handling across CoreData and SwiftData paths

Changes:
- CoreDataTodoDao: Add createdAt and isCompleted to insert/update
- SwiftDataTodoDao: Add createdAt and isCompleted to insert/update
- ITodoDao: Update interface signatures to throw errors
- TodoRepository: Add error handling with fallback to empty arrays
- TodoHomeViewModel: Make toggle async and persist to database
- ITodoRepository: Update method signature to use id instead of entity
- Remove force unwrap in Encodable.toJSONString() to prevent crashes
- Remove @unchecked Sendable from Backend class (not needed)
- Use user ID for profile image URLs instead of hardcoded ID
- Update localization: "jailbroken-status" to "Jailbroken Status"
- Fix trailing newline in Localizable.xcstrings

Safety improvements:
- Encodable+.swift: Return optional String instead of force unwrapping
- Backend.swift: Remove unsafe @unchecked Sendable conformance
- Store module: Dynamic profile images based on user ID
Add user-facing error handling with alert dialogs to provide feedback
when database operations fail.

Key improvements:
- Add showErrorAlert property for clean SwiftUI binding
- Add errorMessage property to store user-friendly error messages
- Fix critical bug: only update local state after successful DB operations
- Change add() to reload data from DB instead of appending to local list
- Use clearError() method consistently to avoid code duplication
- Display error alerts in TodoHomeScreen with native SwiftUI alert
- Improve error logging with descriptive messages

Error handling added for:
- Failed to add todo
- Failed to update todo
- Failed to toggle todo status

This addresses the code review feedback about missing user-facing
error handling in TodoHomeViewModel.
- Create MockCertificateStore extension with reusable certificate constants
- Move certificate constants from NetworkKitTests to centralized location
- Add mock certificate for httpbin.org (Amazon RSA 2048 M02)
- Update NetworkKitProdTests with improved test organization
- Fix error message assertions to match actual implementation
- Add tests for certificate pinning edge cases (no match, empty list)
- Improve test documentation for production environment setup
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @ImaginativeShohag, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request delivers a major update by introducing a robust e-commerce 'Store' module, enhancing media capture and editing capabilities with image markup, and refactoring the 'Todo' module to support both SwiftData and Core Data. It also integrates new external libraries for advanced SwiftUI features and UI testing, alongside numerous foundational improvements for concurrency, utility, and overall code quality.

Highlights

  • Tuist Configuration & Dependencies: Updated Tuist to version 4.50.2, removed the old Tuist/Package.resolved, and integrated new external dependencies: SwiftUIIntrospect for advanced SwiftUI view introspection and TestUtils for enhanced UI testing utilities.
  • Core Data Integration for Todo Module: Introduced a new Core Data model (TodoDB.xcdatamodel) and configured the Todo module to support Core Data, alongside SwiftData, as a data persistence option. This includes new data source, database, and DAO implementations for Core Data.
  • Image/Video Capture & Markup Features: Significantly enhanced media handling with an improved ImageVideoCapturer supporting maxImageSize and asynchronous video thumbnail generation. New features for image markup (drawing, text, shapes) and QuickLook previews for captured media were also added.
  • Comprehensive Store Module: Implemented a new Store module, providing a full e-commerce experience including product listings, category browsing, cart management, user login, profile viewing, and order history, leveraging fakestoreapi.com.
  • UIState and Concurrency Improvements: The UIState enum was enhanced with documentation and Equatable conformance. Concurrency safety was improved across various view models and network components by adopting @MainActor and Sendable protocols.
  • General Utility Extensions: Added several utility extensions to UIImage (resizing, dominant color), UIApplication (keyboard control, active window), URL (safer logging), and UIDevice (simulator detection) to streamline common tasks.
  • NavigationKit Enhancements: The BaseDestination class in NavigationKit was updated to be @MainActor and @preconcurrency Sendable for better concurrency safety, and a new multi-navigation demo was added.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/test-app.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Targets/Home/Sources/UI/Screens/ImageVideoSelection/MediaSelectViewModel.swift Outdated
Comment thread Targets/Store/Sources/UI/Components/ErrorView.swift
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a significant number of new features and refactorings. Major additions include the "Store" module, which seems to be a fake store implementation, and a comprehensive image markup feature with drawing, text, and shape tools. The Todo module has been refactored to support multiple data sources (Core Data and SwiftData), which is a great improvement for flexibility. There are also many smaller improvements across the codebase, such as adopting modern Swift concurrency features (@MainActor, @Observable, Sendable), improving localization, and adding test utilities.

My review focuses on a few critical areas. I've pointed out a potential crash due to a force unwrap when handling video URLs and another one in a screenshot utility. I've also suggested refactoring some duplicated code for better maintainability and pointed out a potential bug in the image rendering logic for the new markup feature.

Overall, this is a massive and impressive update. The new features are substantial, and the refactoring work modernizes the codebase significantly.

Comment thread Targets/CommonUI/Sources/Components/ImageVideoCapturer/ImageVideoCapturer.swift Outdated
Comment thread Targets/Core/Sources/Extensions/View+.swift Outdated
Comment thread Targets/CommonUI/Sources/Components/ImageVideoCapturer/ImageVideoCapturer.swift Outdated
- Move project documentation from CLAUDE.md to AGENTS.md for better organization
- Update CLAUDE.md to reference AGENTS.md
- Refactor ImageVideoCapturer to simplify image handling logic and add nil safety for video URLs
- Remove deprecated screenshot() and hideKeyboard() methods from View+ extension
- Update copyright year to 2025 in UIApplication+ extension
- Fix localization key inconsistencies in AppStorageScreen and SuperToastScreen
- Reorganize localization strings in Localizable.xcstrings
- Add missing tab item label for blue tab
- Improve code formatting and consistency across screens
@ImaginativeShohag ImaginativeShohag merged commit 768fd51 into main Nov 19, 2025
1 check 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.

2 participants