Skip to content

Bug 2045566 - Add Firefox Labs APIs#7413

Open
freshstrangemusic wants to merge 1 commit into
mainfrom
freshstrangemusic/push-prpxoxworxst
Open

Bug 2045566 - Add Firefox Labs APIs#7413
freshstrangemusic wants to merge 1 commit into
mainfrom
freshstrangemusic/push-prpxoxworxst

Conversation

@freshstrangemusic

Copy link
Copy Markdown
Member

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

@freshstrangemusic

Copy link
Copy Markdown
Member Author

This is missing a few more tests and a changelog entry, but its ~ done

@freshstrangemusic freshstrangemusic force-pushed the freshstrangemusic/push-prpxoxworxst branch 3 times, most recently from ab04bbb to 4f8205e Compare June 12, 2026 04:30
@freshstrangemusic freshstrangemusic force-pushed the freshstrangemusic/push-prpxoxworxst branch 7 times, most recently from 4c8d66d to 49703cc Compare June 12, 2026 19:59
@freshstrangemusic freshstrangemusic force-pushed the freshstrangemusic/push-prpxoxworxst branch from 49703cc to 33480d7 Compare June 12, 2026 22:07

@ohall-m ohall-m left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for working on this!! The API surface looks perfect, thank you!

Just leaving a note that I've began manually testing locally with this patch. My main goal is to test using nimbus-cli and pull getAvailableFirefoxLabs. I also hope to test connecting enrollInFirefoxLab and unenrollFromFirefoxLab.

LGTM, mostly just want to test and understand a few more things.

pub requires_restart: bool,
pub title_string_id: String,
pub description_string_id: String,
pub connect_url: Option<String>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Android calls this feedback_url, but it doesn't really matter, since we have to deserialize it to the view type anyway. Fenix generally tries to keep implementation specific names away, when we can.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yep this can be feedback_url, no problem.

Enrolled,
AlreadyEnrolled,
NoExperiment,
NotFirefoxLabsOptIn,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for chatting with me about these on Slack! Just leaving what we talked about for future reference, please feel free to correct:

  • Enrolled -> Do nothing, leave toggle enabled
  • AlreadyEnrolled -> Do nothing, leave toggle enabled
  • NoExperiment -> "This Lab is no longer available". Can only happen if there is a background update while the user has the screen open.
  • NotFirefoxLabsOptIn -> Generic error message, lab remove from screen.
  • Error -> Generic error message.

I also asked on Figma again if we want any specific messaging in these situations.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We should also remove the entry in the case of NoExperiment

@ohall-m ohall-m left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

r+ from an Android/Kotlin perspective. [Patch still needs a qualified Nimbus reviewer.]

I manually tested on Android using nimbus-cli and successfully was able to getAvailableFirefoxLabs and enroll/unenroll from a cli Labs that set nimbus-validation's settings-punctuation.

I didn't test edge cases, but established the general flow works as expected.

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