Skip to content

Add marketing workflow tools + OpenPaths routing and update subscription pricing/UI#30

Open
lee101 wants to merge 1 commit intomainfrom
codex/fix-mobile-full-width-issue-in-documents-section
Open

Add marketing workflow tools + OpenPaths routing and update subscription pricing/UI#30
lee101 wants to merge 1 commit intomainfrom
codex/fix-mobile-full-width-issue-in-documents-section

Conversation

@lee101
Copy link
Copy Markdown
Contributor

@lee101 lee101 commented Apr 17, 2026

Motivation

  • Provide a set of marketing growth tools backed by an OpenAI-compatible routed endpoint so outputs can be compared across models and combined into actionable reports.
  • Surface a nicer checkout/subscription UI and reduce recurring prices while wiring backend price IDs for Stripe integration.
  • Add client-side tooling and templates to let users run workflows directly from the tools catalog.

Description

  • Added OpenPaths integration in main.py with OPENPATHS_API_BASE, OPENPATHS_API_KEY, OPENPATHS_ROUTER_MODELS, call_openpaths_chat, and the MarketingWorkflowRequest model to call an OpenAI-compatible /chat/completions endpoint and handle errors.
  • Implemented a new API endpoint POST /api/tools/marketing-workflow in main.py that accepts a workflow key, runs the configured prompt instructions, routes to configured models, and returns per-model analyses plus combined markdown.
  • Registered four new tools in questions/tool_fixtures.py and added a shared Jinja2 template static/templates/tools/marketing-workflow-tool.jinja2 and client script static/js/marketing-workflow-tool.js to power the tool UI and interactions.
  • Updated subscription and checkout flows by introducing MONTHLY_SUBSCRIPTION_PRICE_ID and ANNUAL_SUBSCRIPTION_PRICE_ID in main.py and replacing inline price IDs with these constants in checkout creation code.
  • Revamped checkout/subscription UI assets by updating static/js/checkout-dialog.js, static/js/subscription-modal.js, and static/js/unlimited-ai-modal.js to show the new prices ($9.99 monthly, $99.99 annual), add an offer chooser/credits panel, and expose showCheckoutDialog; added complementary CSS in static/css/checkout-dialog.css and a new tool template and index entries for the new tools.
  • Adjusted templates (static/templates/ai-text-editor.jinja2, shared index and subscribe templates) and tests to reflect pricing and UI changes.

Testing

  • Ran the test suite with pytest covering modified and new tests tests/test_checkout_session.py, test_subscription_system.py, tests/unit/test_growth_tools_catalog.py, and tests/unit/test_pricing_configuration.py and confirmed all tests passed.
  • Verified unit checks validate presence of new MONTHLY_SUBSCRIPTION_PRICE_ID and ANNUAL_SUBSCRIPTION_PRICE_ID in main.py and updated pricing strings in frontend JS files via the added tests.
  • Exercised the new marketing workflow endpoint flow via unit-level assertions that the tool fixtures and template references exist (covered by tests/unit/test_growth_tools_catalog.py).

Codex Task

@lee101
Copy link
Copy Markdown
Contributor Author

lee101 commented Apr 17, 2026

Codex Infinity
Hi! I'm Codex Infinity, your coding agent for this repo.

Start a task on this PR's branch by commenting:

Tasks and logs: https://codex-infinity.com

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