Skip to content

[FOSSOVERFLOW-26] UI of all planned features completed#6

Open
Sri-Varshith wants to merge 7 commits intoOpenLake:mainfrom
Sri-Varshith:task1
Open

[FOSSOVERFLOW-26] UI of all planned features completed#6
Sri-Varshith wants to merge 7 commits intoOpenLake:mainfrom
Sri-Varshith:task1

Conversation

@Sri-Varshith
Copy link
Contributor

@Sri-Varshith Sri-Varshith commented Mar 5, 2026

The final features with complete UI:

  1. Online Meet (functional and done)
  2. Track mood (UI done not functional yet)
  3. Book session (done)
  4. Stress check (UI done)
  5. Articles (done)

Summary by CodeRabbit

  • New Features

    • Launched new Online Meet page with separate tabs for scheduled and attended meetings.
    • Added ability to schedule new meetings with date/time selection, title, and optional notes.
    • Integrated external link for direct session booking.
  • Style

    • Updated dark theme primary color from blue to green.
  • Removed Features

    • Removed Guided Meditation and Calm Music feature options.

@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

Walkthrough

This PR introduces a new OnlineMeet feature by adding a Meeting model, a dedicated page with scheduled/attended meeting tabs and a scheduling interface, a reusable MeetingCard widget, integrating url_launcher and intl dependencies, updating the homepage navigation, and changing the dark theme accent color from blue to green.

Changes

Cohort / File(s) Summary
Meeting Model & Widget
flutter_app/lib/models/meeting_model.dart, flutter_app/lib/widgets/meeting_card.dart
New Meeting model with title, scheduledAt, notes, and isAttended getter; new MeetingCard widget displaying meeting details with formatted date/time and tap callback.
OnlineMeet Feature
flutter_app/lib/pages/online_meet_page.dart
New stateful page managing meetings in Scheduled/Attended tabs via TabController, includes bottom sheet form for scheduling new meetings with date/time picker, title, and notes fields; seeds initial data with four meetings.
Homepage Updates
flutter_app/lib/pages/homepage.dart
Added url_launcher import and navigation to OnlineMeetPage; introduced \_launchURL helper for external URL opening with error handling; replaced empty Book a Session onTap with URL launch, removed Guided Meditation and Calm Music feature cards.
Theme & Dependencies
flutter_app/lib/core/theme/dark_theme.dart, flutter_app/pubspec.yaml
Changed dark theme seedColor from blue to green; added url_launcher (^6.3.1) and intl (^0.20.2) dependencies.

Sequence Diagram

sequenceDiagram
    actor User
    participant HomePage
    participant OnlineMeetPage
    participant MeetingCard
    participant Meeting

    User->>HomePage: Tap "1:1 Online Meet"
    HomePage->>OnlineMeetPage: Navigate to OnlineMeetPage
    OnlineMeetPage->>OnlineMeetPage: Load initial _allMeetings (4 seeded)
    OnlineMeetPage->>MeetingCard: Render Scheduled tab with meetings
    User->>OnlineMeetPage: Tap FloatingActionButton
    OnlineMeetPage->>OnlineMeetPage: Show scheduling bottom sheet
    User->>OnlineMeetPage: Select date/time, enter title & notes
    User->>OnlineMeetPage: Tap "Schedule" button
    OnlineMeetPage->>Meeting: Create new Meeting instance
    OnlineMeetPage->>OnlineMeetPage: Append to _allMeetings, rebuild
    OnlineMeetPage->>MeetingCard: Update displayed tabs
    MeetingCard->>User: Display updated meetings with formatted date
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 A green theme hop, meetings now stack tall,
With cards that card, and tabs that call,
Schedule away your day so bright,
Past and future, side by side in sight! 📅✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title mentions 'UI of all planned features completed' but the PR primarily implements the Online Meet feature with a new page, model, and widget, along with modifications to the homepage and theme. While UI work is involved, the title is overly broad and doesn't specify the main change focus. Consider a more specific title like '[FOSSOVERFLOW-26] Add Online Meet page with meeting scheduling' to better reflect the primary implementation work in this PR.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
flutter_app/lib/pages/online_meet_page.dart (1)

263-265: Keep title-driven rebuilds local to the bottom sheet.

At Line [263]-Line [265], every title keystroke triggers full page setState(). This is avoidable overhead; keep this reactive state inside the sheet (StatefulBuilder/ValueListenableBuilder) instead of rebuilding tabs and lists.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@flutter_app/lib/pages/online_meet_page.dart` around lines 263 - 265, The
current _titleController.addListener calls the page-level setState(), causing
the whole OnlineMeetPage to rebuild on each keystroke; instead remove that
global listener and move the reactive UI into the bottom sheet: when showing the
sheet that uses _titleController, wrap the sheet content in a StatefulBuilder or
a ValueListenableBuilder (listening to _titleController) and update only the
sheet UI there (call setState provided by StatefulBuilder or rely on
ValueListenableBuilder rebuilds) so keystrokes only rebuild the bottom-sheet
widgets, not the entire page.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@flutter_app/lib/pages/online_meet_page.dart`:
- Around line 115-123: When updating _selectedDateTime inside the bottom sheet
(the setSheetState block that constructs a DateTime from date and time),
validate the composed DateTime against DateTime.now() and prevent selecting a
past datetime: compute the candidate DateTime from the selected date and time,
and if candidate.isBefore(DateTime.now()) either clamp it to DateTime.now() or
show a validation error and do not assign to _selectedDateTime; apply the same
check for the other identical update site (the second location where
_selectedDateTime is set) so meetings for today cannot be scheduled in the past.
- Around line 40-41: The _scheduled and _attended getters rely on
Meeting.isAttended (which uses DateTime.now()) and can drift between itemCount
and itemBuilder; to fix, compute a stable snapshot at build time: capture a
single DateTime now (or compute and store List<Meeting> scheduledSnapshot and
attendedSnapshot) at the start of the widget's build method (or before the
ListView.builder is constructed) and use those snapshots for both itemCount and
itemBuilder instead of the getters, making sure to reference the unique symbols
_scheduled, _attended and Meeting.isAttended when converting the logic so the
lists remain consistent during the frame.

---

Nitpick comments:
In `@flutter_app/lib/pages/online_meet_page.dart`:
- Around line 263-265: The current _titleController.addListener calls the
page-level setState(), causing the whole OnlineMeetPage to rebuild on each
keystroke; instead remove that global listener and move the reactive UI into the
bottom sheet: when showing the sheet that uses _titleController, wrap the sheet
content in a StatefulBuilder or a ValueListenableBuilder (listening to
_titleController) and update only the sheet UI there (call setState provided by
StatefulBuilder or rely on ValueListenableBuilder rebuilds) so keystrokes only
rebuild the bottom-sheet widgets, not the entire page.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7cbc329d-ee13-41a8-aeaa-38e7c4f0e2cd

📥 Commits

Reviewing files that changed from the base of the PR and between a596991 and 4edc1b2.

⛔ Files ignored due to path filters (1)
  • flutter_app/pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • flutter_app/lib/core/theme/dark_theme.dart
  • flutter_app/lib/models/meeting_model.dart
  • flutter_app/lib/pages/homepage.dart
  • flutter_app/lib/pages/online_meet_page.dart
  • flutter_app/lib/widgets/meeting_card.dart
  • flutter_app/pubspec.yaml

Comment on lines +40 to +41
List<Meeting> get _scheduled => _allMeetings.where((m) => !m.isAttended).toList();
List<Meeting> get _attended => _allMeetings.where((m) => m.isAttended).toList();
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Stabilize scheduled/attended snapshots per build to avoid list/index drift.

At Line [40]-Line [41], these getters depend on DateTime.now() transitively (Meeting.isAttended). In ListView.builder, itemCount and itemBuilder can observe different snapshots, causing edge-case out-of-range access around time boundaries.

💡 Proposed fix
-  List<Meeting> get _scheduled => _allMeetings.where((m) => !m.isAttended).toList();
-  List<Meeting> get _attended => _allMeetings.where((m) => m.isAttended).toList();
+  ({List<Meeting> scheduled, List<Meeting> attended}) _partitionMeetings(DateTime now) {
+    final scheduled = <Meeting>[];
+    final attended = <Meeting>[];
+    for (final meeting in _allMeetings) {
+      if (meeting.scheduledAt.isBefore(now)) {
+        attended.add(meeting);
+      } else {
+        scheduled.add(meeting);
+      }
+    }
+    return (scheduled: scheduled, attended: attended);
+  }
@@
   Widget build(BuildContext context) {
+    final now = DateTime.now();
+    final partitions = _partitionMeetings(now);
+    final scheduled = partitions.scheduled;
+    final attended = partitions.attended;
     return SafeArea(
@@
-            _scheduled.isEmpty
+            scheduled.isEmpty
@@
-                    itemCount: _scheduled.length,
+                    itemCount: scheduled.length,
                     itemBuilder: (context, index) => MeetingCard(
-                      meeting: _scheduled[index],
+                      meeting: scheduled[index],
@@
-              _attended.isEmpty
+              attended.isEmpty
@@
-                      itemCount: _attended.length,
+                      itemCount: attended.length,
                       itemBuilder: (context, index) => MeetingCard(
-                        meeting: _attended[index],
+                        meeting: attended[index],

Also applies to: 315-343

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@flutter_app/lib/pages/online_meet_page.dart` around lines 40 - 41, The
_scheduled and _attended getters rely on Meeting.isAttended (which uses
DateTime.now()) and can drift between itemCount and itemBuilder; to fix, compute
a stable snapshot at build time: capture a single DateTime now (or compute and
store List<Meeting> scheduledSnapshot and attendedSnapshot) at the start of the
widget's build method (or before the ListView.builder is constructed) and use
those snapshots for both itemCount and itemBuilder instead of the getters,
making sure to reference the unique symbols _scheduled, _attended and
Meeting.isAttended when converting the logic so the lists remain consistent
during the frame.

Comment on lines +115 to +123
setSheetState(() {
_selectedDateTime = DateTime(
date.year,
date.month,
date.day,
time.hour,
time.minute,
);
});
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Block scheduling in the past for today’s date.

At Line [115]-Line [123], a past time can still be selected for the current day. Those meetings can instantly fall into “Attended,” which breaks the scheduling intent.

💡 Proposed fix
                           setSheetState(() {
-                            _selectedDateTime = DateTime(
+                            final picked = DateTime(
                               date.year,
                               date.month,
                               date.day,
                               time.hour,
                               time.minute,
                             );
+                            _selectedDateTime = picked.isAfter(DateTime.now()) ? picked : null;
                           });
+                          if (_selectedDateTime == null && mounted) {
+                            ScaffoldMessenger.of(context).showSnackBar(
+                              const SnackBar(content: Text('Please choose a future time')),
+                            );
+                          }

Also applies to: 224-239

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@flutter_app/lib/pages/online_meet_page.dart` around lines 115 - 123, When
updating _selectedDateTime inside the bottom sheet (the setSheetState block that
constructs a DateTime from date and time), validate the composed DateTime
against DateTime.now() and prevent selecting a past datetime: compute the
candidate DateTime from the selected date and time, and if
candidate.isBefore(DateTime.now()) either clamp it to DateTime.now() or show a
validation error and do not assign to _selectedDateTime; apply the same check
for the other identical update site (the second location where _selectedDateTime
is set) so meetings for today cannot be scheduled in the past.

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