Skip to content

fix: register platform deprecation flags in serve.py lifespan#1289

Merged
neelasha-writer merged 5 commits into
devfrom
fix-ACTION-5011-register-deprecation-feature-flags
Jun 29, 2026
Merged

fix: register platform deprecation flags in serve.py lifespan#1289
neelasha-writer merged 5 commits into
devfrom
fix-ACTION-5011-register-deprecation-feature-flags

Conversation

@neelasha-writer

@neelasha-writer neelasha-writer commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Problem

The deprecation banner in BuilderApp.vue (introduced in PR #1288) checks:

wf.featureFlags.value.includes("beforeDeprecationCutoffAbv2")

However, writer.Config.feature_flags defaults to an empty list in core.py, and PR #1288 didn't add the deprecation flag keys there. This means the LaunchDarkly client never registers those flags for evaluation, so featureFlags.value in the Vue frontend never includes them — the banner never shows.

Fix

After app_runner.load() in the lifespan context manager in serve.py, we now merge the two platform-level deprecation flags into writer.Config.feature_flags:

_PLATFORM_FLAGS = {"beforeDeprecationCutoffAbv2", "afterDeprecationCutoffAbv2"}
writer.Config.feature_flags = list(set(writer.Config.feature_flags) | _PLATFORM_FLAGS)

This runs after the user's main.py executes (so user-defined flags are preserved), and ensures the LaunchDarkly client evaluates the deprecation flags for every agent builder session.

Out of scope

  • The x-is-org-admin header injection still needs a platform/proxy configuration change to correctly populate wf.isOrganizationAdmin.value in the frontend. That is a separate infrastructure task.

Made with Cursor

Summary by CodeRabbit

  • Backend / Chores
    • Platform-level deprecation feature flags are now automatically registered during app startup, merged with any application-defined flags, and deduplicated.
  • UI/UX
    • Removed deprecation overlay elements from the Agent Builder interface.
    • Updated post-cutoff messaging for non-admin users to guide them to migrate their agent to the new Agent Builder with their Admin.
    • Improved banner text layout responsiveness by adjusting its maximum width.
  • Tests
    • Updated feature flag assertions to treat flags as an unordered set and expanded expected flags.

Ensures `beforeDeprecationCutoffAbv2` and `afterDeprecationCutoffAbv2`
are always included in `writer.Config.feature_flags` after the user app
loads. This causes the LaunchDarkly client to evaluate these flags on
every agent builder session, so the builder deprecation banner in
BuilderApp.vue receives the correct flag values.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: eaada1c2-2a15-4659-a78c-09db171f4319

📥 Commits

Reviewing files that changed from the base of the PR and between 6bf8969 and 9e52cee.

📒 Files selected for processing (1)
  • tests/backend/test_serve.py

📝 Walkthrough

Walkthrough

During FastAPI startup, serve.py adds two platform deprecation feature flags into writer.Config.feature_flags. The builder UI removes its deprecation overlay elements and updates the non-admin deprecation banner copy and width.

Changes

LaunchDarkly deprecation flag registration

Layer / File(s) Summary
Platform deprecation flag injection at startup
src/writer/serve.py, tests/backend/test_serve.py
Adds a top-level writer module import and, during ASGI lifespan startup, merges two platform deprecation feature flag keys into writer.Config.feature_flags with deduplication; the feature-flag test now expects the expanded unordered set.

Builder deprecation UI updates

Layer / File(s) Summary
Builder overlay removal
src/ui/src/builder/BuilderApp.vue
Removes the conditional deprecation overlay elements from the template and deletes the scoped CSS rules for the overlay and blocker classes.
Deprecation banner copy
src/ui/src/builder/BuilderDeprecationBanner.vue
Updates the non-admin post-cutoff banner body text to direct users to work with their Admin to migrate to the new Agent Builder and changes the copy width constraint to a responsive value.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • writer/writer-framework#1288: Directly overlaps with the builder deprecation UI changes in BuilderApp.vue and BuilderDeprecationBanner.vue.

Suggested reviewers

  • yavorsky

Poem

🐇 The flags hopped in at startup light,
The builder shed its dimmer night.
A banner changed its words to say,
“Ask your Admin to lead the way.”
The copy stretched with room to spare,
While bunny ears bounced everywhere.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: registering platform deprecation flags during serve.py lifespan startup.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-ACTION-5011-register-deprecation-feature-flags

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Neelashab and others added 4 commits June 29, 2026 12:03
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@neelasha-writer neelasha-writer merged commit 1286313 into dev Jun 29, 2026
16 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.

3 participants