Skip to content

feat: generalized session side-issues with avatar indicator and account summary#1366

Merged
SERDUN merged 2 commits into
developfrom
feat/session-status-side-issues
Jun 9, 2026
Merged

feat: generalized session side-issues with avatar indicator and account summary#1366
SERDUN merged 2 commits into
developfrom
feat/session-status-side-issues

Conversation

@SERDUN

@SERDUN SERDUN commented Jun 8, 2026

Copy link
Copy Markdown
Member

Overview

Generalize how session-level problems are surfaced. Instead of hardcoding a single status, session_status now carries a generic list of side issues (id + severity), independent of the primary signaling/connection status. The UI consumes the aggregated list generically, so new issue sources can be added without touching the indicator widgets.

The first (and currently only) source is the limited standalone call mode (no Android Telecom). It is intentionally pluggable: more sources (battery, push, etc.) can be added later by producing more SessionIssues.

Behaviour (matches mockups)

  • Top app bar (all tabs): a generic orange "!" badge on the user avatar whenever there is >=1 issue, colored by the most severe. The connection status keeps its own signal (avatar ring / dot) - side issues are purely additive.
  • My account: the same "!" badge on the avatar + a warning subtitle (top issue, e.g. "Standalone - delivery may be delayed") on the status row, which already taps through to Diagnostic for details.

Changes

  • SessionIssue model (id + severity) + SessionIssueL10n/severity-color extension.
  • SessionStatusState gains List<SessionIssue> issues with hasIssues / topIssue helpers.
  • SessionStatusCubit fetches the call-delivery mode once at session start and produces the standalone issue.
  • Reusable SessionIssueBadge; wired into MainAppBar and UserInfoListTile; SessionStatusListTile shows the top-issue subtitle.
  • l10n sessionStatus_issue_* (English base; UK/IT via Localizely).
  • Unit tests for issue aggregation (topIssue / hasIssues).

Relationship to other PRs

Scope

Deliberately minimal per the agreed direction: generic registry + avatar "!" + account summary, with standalone as the first consumer. Microphone permission keeps its existing dedicated badge for now; connection status is not duplicated as an issue. These can migrate into the registry later.

SERDUN added 2 commits June 9, 2026 08:57
…nt summary

Introduce a generic "side issues" concept in session_status, independent of the
primary signaling/connection status. Each issue has an id and a severity; the UI
consumes the aggregated list generically so new issue sources can be added
without touching the indicator widgets.

- New SessionIssue model (id + severity) and SessionIssueL10n/color extension.
- SessionStatusState carries a List<SessionIssue> with hasIssues/topIssue helpers.
- SessionStatusCubit produces issues from sources; the first source is the
  limited standalone call mode (callkeep getCallDeliveryMode == standalone).
- MainAppBar shows a generic "!" badge on the avatar when there is any issue,
  colored by the most severe (reusable SessionIssueBadge).
- My account: avatar badge + a warning subtitle (top issue) on the status row,
  tapping through to Diagnostic for details.

Connection status keeps its own signal (avatar ring / dot); side issues are
purely additive. Standalone is just the first consumer of the registry.
@SERDUN SERDUN force-pushed the feat/session-status-side-issues branch from f7f0c59 to d1ccb2f Compare June 9, 2026 06:00
@SERDUN SERDUN requested a review from Copilot June 9, 2026 06:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Generalizes session-level “side issues” (separate from primary signaling/connection status) and surfaces them via a reusable avatar/account warning indicator, starting with limited standalone call mode as the first issue source.

Changes:

  • Added SessionIssue model + severity/id enums, with localization and severity-driven UI helpers.
  • Extended SessionStatusState/SessionStatusCubit to aggregate and expose session issues (incl. topIssue).
  • Updated UI (main app bar + My Account tiles) to show a generic “!” badge and top-issue subtitle; added unit tests for aggregation.

Reviewed changes

Copilot reviewed 21 out of 23 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/features/session_status/bloc/session_status_state_test.dart Adds unit tests for hasIssues / topIssue aggregation behavior.
lib/widgets/main_app_bar.dart Overlays the new issue badge on the top app bar avatar when issues exist.
lib/models/session_issue.dart Introduces the SessionIssue model + enums.
lib/models/models.dart Exports the new session_issue.dart model.
lib/extensions/session_issue.dart Adds severity-to-color and issue l10n helpers used by UI.
lib/extensions/extensions.dart Exports the new session_issue extensions.
lib/features/session_status/bloc/session_status_state.dart Adds issues, hasIssues, and topIssue to session status state.
lib/features/session_status/bloc/session_status_cubit.dart Fetches call delivery mode once and emits issues via _buildIssues().
lib/features/session_status/bloc/session_status_cubit.freezed.dart Regenerated for the new issues field.
lib/features/session_status/widgets/session_issue_badge.dart Adds the reusable “!” badge widget.
lib/features/session_status/widgets/widgets.dart Exports the new badge widget.
lib/features/session_status/session_status.dart Re-exports session-status widgets.
lib/features/settings/view/settings_screen.dart Wires topIssue into My Account header and session status row.
lib/features/settings/widgets/user_info_list_tile.dart Adds optional badge overlay on the account avatar.
lib/features/settings/widgets/session_status_list_tile.dart Shows top-issue subtitle in the session status row.
lib/l10n/arb/app_en.arb Adds issue title/caption strings (English).
lib/l10n/arb/app_it.arb Adds issue title/caption strings (Italian).
lib/l10n/arb/app_uk.arb Adds issue title/caption strings (Ukrainian).
lib/l10n/app_localizations.g.dart Regenerated localization getters for new keys.
lib/l10n/app_localizations_en.g.dart Regenerated English localization implementation.
lib/l10n/app_localizations_it.g.dart Regenerated Italian localization implementation.
lib/l10n/app_localizations_uk.g.dart Regenerated Ukrainian localization implementation.
lib/l10n/app_localizations.g.mapper.dart Regenerated mapper entries for new localization keys.
Files not reviewed (2)
  • lib/features/session_status/bloc/session_status_cubit.freezed.dart: Language not supported
  • lib/l10n/app_localizations.g.mapper.dart: Language not supported

Comment thread lib/widgets/main_app_bar.dart
Comment on lines +6 to +18
extension SessionIssueSeverityColor on SessionIssueSeverity {
// TODO(Serdun): Move to color scheme
Color color(BuildContext context) {
switch (this) {
case SessionIssueSeverity.critical:
return Colors.red;
case SessionIssueSeverity.warning:
return Colors.orange;
case SessionIssueSeverity.info:
return Colors.blueGrey;
}
}
}
Comment thread lib/features/session_status/widgets/session_issue_badge.dart
Comment on lines 3 to 7
import 'package:webtrit_phone/models/models.dart';

import 'package:webtrit_phone/extensions/extensions.dart';
import 'package:webtrit_phone/features/session_status/session_status.dart';
import 'package:webtrit_phone/utils/utils.dart';
Comment thread lib/features/session_status/bloc/session_status_cubit.dart
@SERDUN SERDUN merged commit c693be1 into develop Jun 9, 2026
3 checks 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