Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
97db878
Changed conditions for _presenceUpdater fire to make it semantic bool…
mikewillems Feb 6, 2026
52e5fe5
Add transition timer to detect stalled breakout room joins. Clear _in…
mikewillems Feb 6, 2026
3768431
Cancel stalled breakout room transitions after 10 seconds. If Agora d…
mikewillems Feb 6, 2026
18ed1d8
localize the breakout room transition timeout message to keep things …
mikewillems Feb 6, 2026
2e14112
Add Java 21 setup to Firebase test workflow
mikewillems Feb 13, 2026
f91ef90
Merge remote-tracking branch 'origin/staging' into mw/fix/presence-count
mikewillems Feb 13, 2026
b96284b
added comments to clarify variable roles
mikewillems Feb 28, 2026
2bacbf9
added analytics to log breakout room transition times
mikewillems Feb 28, 2026
591785b
moved all the magic numbers in live_meeting_provider.dart to constants
mikewillems Feb 28, 2026
107f92d
remove dead breakout countdown state machine from BreakoutRoomsDialog
mikewillems Feb 28, 2026
d6481e0
magic nums -> constants and clarify naming / comments for timing dela…
mikewillems Feb 28, 2026
7799198
timing magic nums -> constants in meeting flow & agenda setup
mikewillems Feb 28, 2026
7cf3f9b
timing magic nums -> constants in event entry & user auth propagation…
mikewillems Feb 28, 2026
73ccbe5
timing magic nums -> constants in UrlVideoWidget live stream playback
mikewillems Feb 28, 2026
bcade12
timing magic nums -> constants in FirestoreEventService query lookbac…
mikewillems Feb 28, 2026
568fa69
removed unused imports
mikewillems Feb 28, 2026
7c7bd51
removed unused imports in touched files and registered an unlsted dep…
mikewillems Feb 28, 2026
689de50
removed invalid @override annotations from non-duplicate stub getters
mikewillems Feb 28, 2026
08a5190
corrected enum_to_string dependency type
mikewillems Feb 28, 2026
57a78fe
remove unused top-level duplicate of _kHoursAfterEventToShow
mikewillems Feb 28, 2026
bc9b619
fixed usage of library_private_types_in_public_api antipattern in fil…
mikewillems Feb 28, 2026
a430485
fixed synchronous calls across async gaps in files touched by this PR
mikewillems Feb 28, 2026
c547bea
moved debug print statement to dedicated debug log
mikewillems Feb 28, 2026
f69fc74
added trailing commas where missing in this PR's files
mikewillems Feb 28, 2026
982ef92
updated deprecated non-centralized asset reference to clean up the la…
mikewillems Feb 28, 2026
2b82140
fixed the rest of the deprecated AppAsset declarations in app_asset.dart
mikewillems Mar 1, 2026
6293012
Merge remote-tracking branch 'origin/staging' into mw/fix/presence-count
mikewillems Mar 2, 2026
9437429
updated live_meeting_provider to use boolean arrow functional alias i…
mikewillems Mar 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ import 'package:rxdart/rxdart.dart';
class FirestoreEventService {
static const events = 'events';

// How far before an event's scheduled time it starts appearing in upcoming
// event queries — keeps recently-started events visible in listings.
static const Duration _upcomingEventsLookback = Duration(minutes: 15);
// Wider lookback used when querying across all communities, to surface
// events that started up to an hour ago.
static const Duration _allCommunitiesEventsLookback = Duration(hours: 1);
// Throttle on the event-participants Firestore stream to avoid processing
// a snapshot on every keystroke / write during busy periods.
static const Duration _participantStreamSampleTime =
Duration(milliseconds: 500);

// final time = await NTP.now();
// Future to mimic NTP.now()
Future<DateTime> get currentTimeAsync => Future(() => clockService.now());
Expand Down Expand Up @@ -79,8 +90,9 @@ class FirestoreEventService {
.where('isPublic', isEqualTo: true)
.where(
'scheduledTime',
isGreaterThan:
Timestamp.fromDate(currentTime.subtract(Duration(minutes: 15))),
isGreaterThan: Timestamp.fromDate(
currentTime.subtract(_upcomingEventsLookback),
),
)
.orderBy('scheduledTime');

Expand All @@ -107,7 +119,7 @@ class FirestoreEventService {
.where(
'scheduledTime',
isGreaterThan:
Timestamp.fromDate(currentTime.subtract(Duration(minutes: 15))),
Timestamp.fromDate(currentTime.subtract(_upcomingEventsLookback)),
)
.orderBy('scheduledTime');

Expand Down Expand Up @@ -142,8 +154,9 @@ class FirestoreEventService {
.where('communityId', isEqualTo: communityId)
.where(
'scheduledTime',
isGreaterThan:
Timestamp.fromDate(currentTime.subtract(Duration(hours: 1))),
isGreaterThan: Timestamp.fromDate(
currentTime.subtract(_allCommunitiesEventsLookback),
),
)
.where('isPublic', isEqualTo: true)
.orderBy('scheduledTime')
Expand Down Expand Up @@ -230,7 +243,7 @@ class FirestoreEventService {
!snapshot.metadata.hasPendingWrites &&
!snapshot.metadata.isFromCache,
)
.sampleTime(Duration(milliseconds: 500))
.sampleTime(_participantStreamSampleTime)
.asyncMap((snapshot) => convertParticipantListAsync(snapshot)),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import 'package:client/services.dart';
import 'package:data_models/analytics/analytics_entities.dart';
import 'package:data_models/events/event.dart';
import 'package:data_models/community/community_tag.dart';
import 'package:client/core/localization/localization_helper.dart';

import '../../../../../../core/routing/locations.dart';

Expand Down Expand Up @@ -54,6 +53,10 @@ Future<bool> verifyAvailableForEvent(Event event) async {
}

class EventPageProvider with ChangeNotifier {
// Short delay to allow Firebase Auth state to propagate before attempting to
// register and enter the meeting with a newly created guest account.
static const Duration _guestAccountSetupDelay = Duration(seconds: 5);

final EventProvider eventProvider;
final CommunityProvider communityProvider;
final NavBarProvider navBarProvider;
Expand Down Expand Up @@ -282,7 +285,7 @@ class EventPageProvider with ChangeNotifier {
password: 'password',
);

await Future.delayed(Duration(seconds: 5));
await Future.delayed(_guestAccountSetupDelay);

// Register
await joinEvent(showConfirm: false);
Expand Down Expand Up @@ -337,6 +340,7 @@ class EventPageProvider with ChangeNotifier {
cancelText: appLocalizationService.getLocalization().no,
).show();
if (cancelParticipation) {
if (!navigatorState.mounted) return;
await alertOnError(
navigatorState.context,
() => firestoreEventService.removeParticipant(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ class EventPage extends StatefulWidget {
}

class EventPageState extends State<EventPage> implements EventPageView {
// How long after the scheduled start time the join-event graphic remains
// visible, giving participants a window to join a meeting already in progress.
static const int _kHoursAfterEventToShow = 2;

EventProvider get _eventProvider => EventProvider.watch(context);

Event get event => _eventProvider.event;
Expand Down Expand Up @@ -240,7 +244,8 @@ class EventPageState extends State<EventPage> implements EventPageView {
final now = clockService.now();
final beforeMeetingCutoff =
scheduled.subtract(Duration(minutes: kMinutesBeforeEventToJoin));
final afterMeetingCutoff = scheduled.add(Duration(hours: 2));
final afterMeetingCutoff =
scheduled.add(Duration(hours: _kHoursAfterEventToShow));

return now.isAfter(beforeMeetingCutoff) && now.isBefore(afterMeetingCutoff);
}
Expand All @@ -260,7 +265,7 @@ class EventPageState extends State<EventPage> implements EventPageView {
Positioned.fill(
child: ProxiedImage(
null,
asset: AppAsset('media/background.gif'),
asset: AppAsset.backgroundGif(),
fit: BoxFit.cover,
loadingColor: Colors.transparent,
),
Expand Down
Loading
Loading