Skip to content

Requestmodel refactor#1692

Draft
badnikhil wants to merge 5 commits into
foss42:mainfrom
badnikhil:requestmodel_refactor
Draft

Requestmodel refactor#1692
badnikhil wants to merge 5 commits into
foss42:mainfrom
badnikhil:requestmodel_refactor

Conversation

@badnikhil

Copy link
Copy Markdown
Contributor

PR Description

Key Changes:

  1. Created the ProtocolModel sealed class union (rest, graphql, ai).
  2. Removed direct httpRequestModel and aiRequestModel fields from RequestModel and replaced them with the protocolModel wrapper.
  3. Updated collection_providers.dart to safely navigate and update state using .mapOrNull().
  4. Migrated Dashbot's chat_viewmodel.dart to become protocol-aware so it doesn't accidentally attempt to modify non-HTTP requests.
  5. Regenerated all *.freezed.dart and *.g.dart files and updated all test fixtures.

Related Issues

  • Closes #

Checklist

  • I have gone through the contributing guide
  • I have updated my branch and synced it with project main branch before making this PR
  • I am using the latest Flutter stable branch (run flutter upgrade and verify)
  • I have run the tests (flutter test) and all tests are passing

Added/updated tests?

We encourage you to add relevant test cases.

  • Yes
  • No, and this is why: please replace this line with details on why tests have not been included

OS on which you have developed and tested the feature?

  • Windows
  • macOS
  • Linux

@badnikhil

badnikhil commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

@animator TODO: implement backward compatibility to support older versions of saved requests.

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