Skip to content

Add Ideas feature (controller, UI, repository, and routing) - #54

Open
ercmine wants to merge 1 commit into
mainfrom
codex/implement-user-ideas-feature-in-flutter-25dux5
Open

Add Ideas feature (controller, UI, repository, and routing)#54
ercmine wants to merge 1 commit into
mainfrom
codex/implement-user-ideas-feature-in-flutter-25dux5

Conversation

@ercmine

@ercmine ercmine commented Mar 7, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Add in-session idea management so users can list, create, delete, and paginate ideas for a session.
  • Expose a dedicated Ideas UI and navigation from the existing session screen so ideas are discoverable and actionable.
  • Surface friend-submitted ideas across UI components using a reusable badge and reuse that indicator in deck-related views.

Description

  • Introduces IdeasState and IdeasController with initLoad, refresh, loadMore, createIdea, and deleteIdea behaviors and pagination support.
  • Adds UI components: IdeasPage, AddIdeaSheet, IdeaListTile, FriendIdeaBadge, and lightweight deck widgets DeckCard and CardDetailsSheet for displaying plans and friend-idea badges.
  • Wires up providers and routing by adding ideasControllerProvider, updating ideasRepository.listIdeas to accept cursor and limit, and registering a new route '/sessions/:id/ideas' in router.dart.
  • Updates SessionPage to navigate to the ideas page and implements form validation and phone normalization in the add-idea sheet.

Testing

  • No automated tests were run for these changes.

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b72aa396f8

ℹ️ 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 on lines +97 to +98
state = state.copyWith(isSubmitting: false);
await refresh();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep submit lock until post-create refresh completes

createIdea clears isSubmitting before awaiting refresh, which re-enables the Add button while the first submission is still in progress; on a slow network, users can tap again and send duplicate create requests because the re-entry guard only checks isSubmitting. This can create duplicate ideas for a single intended submission.

Useful? React with 👍 / 👎.

Comment on lines +136 to +139
await ref.read(ideasControllerProvider(widget.sessionId).notifier).deleteIdea(ideaId);
if (mounted) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Idea deleted')),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Only show delete success after a confirmed delete

The page always shows the "Idea deleted" snackbar after calling deleteIdea, but deleteIdea handles failures internally and does not report success/failure to the caller. If the API delete fails (or refresh fails after delete), users still see a success message, which gives incorrect feedback about data state.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant