Skip to content

Afsan final UI bugs fixes#11

Merged
rezwana-karim merged 7 commits into
mainfrom
afsan-final-ui-bugs-fixes
May 25, 2026
Merged

Afsan final UI bugs fixes#11
rezwana-karim merged 7 commits into
mainfrom
afsan-final-ui-bugs-fixes

Conversation

@rezwana-karim
Copy link
Copy Markdown
Collaborator

This pull request introduces several key architectural improvements and user-facing features, focusing on theming, navigation, and social/profile interactions. The most significant updates include a persistent dark mode toggle using Riverpod, expanded routing for social features, a more discoverable social profile card, and refined color palette adjustments for dark mode. Additionally, a new .remember/remember.md file documents high-signal architectural decisions for future development.

Theming & State Management

  • Added a Riverpod-based ThemeNotifier (theme_notifier.dart, theme_notifier.g.dart) for persistent dark mode support, storing the user's theme preference in SharedPreferences and exposing a themeProvider for app-wide consumption. The theme toggle is now integrated into both the care and pet profile screens, replacing placeholder or unrelated actions. [1] [2] [3] [4] [5] [6]

Navigation & Routing

  • Expanded the app's router to support new social features: added routes for /social/create-story and /social/stories, and updated the post creation route to /social/create-post. Also, tapping a pet avatar now navigates to the pet's social profile instead of home. [1] [2] [3] [4]

Social/Profile UI Enhancements

  • Replaced the "View Social Profile" button in PetProfileScreen with a new _SocialProfileCard widget, providing a more visually engaging and accessible entry point to the pet's social profile. [1] [2]

Theme & Visual Improvements

  • Refined the dark mode color palette in app_colors.dart for improved legibility and consistency, updating several neutral and surface color constants.

Project Documentation

  • Introduced .remember/remember.md to capture high-signal architectural context, including routing conventions, theming, state management, and social feature guidelines for future contributors.

afsan123 and others added 5 commits May 24, 2026 20:48
Add .gitignore entries to exclude automation artifacts: screenshots and UI-dumps under docs/automation and the fresh_2026-05-25_automation folder to avoid committing large generated files.
Copilot AI review requested due to automatic review settings May 25, 2026 13:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends Petfolio’s social experience with Instagram-like Stories support and threaded/liked comments, while also introducing a persistent Riverpod-driven theme mode and expanding social navigation routes.

Changes:

  • Added Supabase schema support for Stories plus comment likes and threaded replies (new tables/RPCs/triggers + RLS).
  • Implemented Stories UI (stories row, story viewer, create story flow) and updated routing to dedicated create-post/create-story pages.
  • Added persistent dark mode via a Riverpod ThemeNotifier and integrated theme toggles into key screens.

Reviewed changes

Copilot reviewed 28 out of 80 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
supabase/migrations/20260525220000_comment_likes_replies.sql Adds parent_id + like_count to comments, introduces comment_likes and like-count trigger/RLS.
supabase/migrations/20260525210000_add_pet_stories.sql Introduces stories table, RLS, and SECURITY DEFINER RPCs for views/cleanup.
progress.md Documents architectural patterns and the new social/theming features.
lib/main.dart Wires themeProvider into MaterialApp.router and minor formatting/title change.
lib/features/social/presentation/screens/story_viewer_screen.dart New full-screen story viewer with timed progress + profile navigation.
lib/features/social/presentation/screens/social_screen.dart Adds stories row, long-press own-story menu, and updates create navigation + paw icons.
lib/features/social/presentation/screens/post_detail_screen.dart Adds threaded replies UI, comment likes UI, reply banner/focus, and edit/delete bottom sheets.
lib/features/social/presentation/screens/create_story_screen.dart New “media-first” story creation flow with camera/gallery + preview/share UX.
lib/features/social/presentation/screens/create_post_screen.dart Ensures create-post defaults to non-story + adjusts image aspect ratio to 4:5.
lib/features/social/presentation/controllers/story_controller.dart New Riverpod controller for fetching stories + optimistic view tracking + adding stories.
lib/features/social/presentation/controllers/create_post_controller.dart Adds isStory mode and routes story submissions through storiesProvider.
lib/features/social/presentation/controllers/comment_controller.dart Adds reply support, comment edit, and optimistic like toggling with snackbars.
lib/features/social/data/repositories/story_repository.dart New repository for story fetch/create + RPC view tracking + image uploads.
lib/features/social/data/repositories/comment_repository.dart Extends comment read/write to include parent + likes and adds like toggle API.
lib/features/social/data/models/story.dart New Story model with joined pet fields and viewedByUsers.
lib/features/social/data/models/comment.dart Adds parentId, likeCount, isLiked, and helper copy methods.
lib/features/pet_profile/presentation/screens/pet_profile_screen.dart Replaces “View Social Profile” button with a richer social profile card + theme toggle action.
lib/features/marketplace/presentation/controllers/my_shop_controller.g.dart Regenerated Riverpod code (hash update).
lib/features/care/presentation/screens/care_screen.dart Replaces prior header action with theme toggle.
lib/features/care/presentation/controllers/care_dashboard_controller.g.dart Regenerated Riverpod code (hash update).
lib/core/widgets/app_header.dart Avatar tap now navigates to the active pet’s social profile.
lib/core/theme/theme.dart Re-exports theme_notifier.dart.
lib/core/theme/theme_notifier.g.dart Generated Riverpod provider for theme mode.
lib/core/theme/theme_notifier.dart Implements persistent theme mode via SharedPreferences.
lib/core/theme/app_theme.dart Minor whitespace change.
lib/core/theme/app_colors.dart Refines dark-mode neutral/surface palette values.
lib/core/router.dart Adds /social/create-story and /social/stories, renames create-post route to /social/create-post.
.remember/remember.md Adds “high-signal context” documentation for routes, theming, stories, and social UI conventions.
.gitignore Ignores additional automation artifacts under docs/automation/.
Comments suppressed due to low confidence (1)

supabase/migrations/20260525220000_comment_likes_replies.sql:65

  • The SECURITY DEFINER trigger function is still executable by PUBLIC unless you explicitly revoke from PUBLIC (revoking from anon, authenticated doesn’t remove privileges granted to PUBLIC). Consider REVOKE ALL/EXECUTE ... FROM PUBLIC and adding SET search_path = public on the function to avoid search_path injection risks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 91 to 97
.insert({
'post_id': postId,
'author_id': _uid,
'pet_id': petId,
'content': content.trim(),
'parent_id': ?parentId,
})
Comment on lines +1 to +5
import 'dart:async';
import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
Comment on lines +236 to +243
data: (stories) {
if (stories.isEmpty) {
WidgetsBinding.instance.addPostFrameCallback((_) => context.pop());
return const SizedBox.shrink();
}

_setupStacks(stories);

Comment on lines +372 to +380
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
_timer?.cancel();
context.push('/social/profile/${activeStack.petId}').then((_) {
if (mounted) {
_startStory();
}
});
Comment on lines +728 to +736
onPressed: () {
final newText = editController.text.trim();
if (newText.isEmpty) return;
Navigator.of(sheetCtx).pop();
ref
.read(commentListProvider(postId).notifier)
.edit(comment.id, newText);
editController.dispose();
},
Comment on lines +237 to 241
class _StoriesRow extends ConsumerWidget {
const _StoriesRow({required this.posts, required this.pet});
final List<FeedPost> posts;
final Pet pet;

Comment on lines 35 to 38
class _CareScreenState extends ConsumerState<CareScreen> {
bool _outdoor = false;
final bool _outdoor = false;
bool _onboardingSuccessHandled = false;
bool _isGeneratingRoutine = false;
Comment on lines +280 to +288
// Build threaded comment display list
final rootComments = list.where((c) => c.parentId == null).toList();
final displayList = <_CommentDisplayItem>[];
for (final root in rootComments) {
displayList.add(_CommentDisplayItem(comment: root, isReply: false));
final replies = list.where((c) => c.parentId == root.id).toList();
for (final reply in replies) {
displayList.add(_CommentDisplayItem(comment: reply, isReply: true));
}
rezwana-karim and others added 2 commits May 25, 2026 20:18
Add a comprehensive Design System HTML and a new PetFolio Redesign folder containing multiple JSX/HTML UI assets (app.jsx, android-frame.jsx, components.jsx, onboarding.jsx, home.jsx, market.jsx, match.jsx, social.jsx, care.jsx, health.jsx, tweaks-panel.jsx, index.html, and screenshots/ref paths). Update .gitignore to exclude PetFolio UI screenshots/ref directories. Also apply UI updates to Flutter screens to align with the redesign: lib/features/care/presentation/screens/care_screen.dart, lib/features/pet_profile/presentation/screens/pet_profile_screen.dart, and several social screens (create_story_screen.dart, post_detail_screen.dart, social_screen.dart, story_viewer_screen.dart). These changes add design documentation and initial frontend redesign components and integrate corresponding Flutter screen adjustments.
@rezwana-karim rezwana-karim merged commit f2a78b0 into main May 25, 2026
5 of 6 checks passed
@rezwana-karim rezwana-karim deleted the afsan-final-ui-bugs-fixes branch May 25, 2026 14:31
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.

4 participants