Skip to content

Winston/update strategy schema#408

Merged
ElasticBottle merged 4 commits intomainfrom
winston/update-strategy-schema
Mar 17, 2026
Merged

Winston/update strategy schema#408
ElasticBottle merged 4 commits intomainfrom
winston/update-strategy-schema

Conversation

@ElasticBottle
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings March 17, 2026 12:35
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the data model for SEO strategies and content by integrating advanced keyword management and LLM query tracking capabilities. It involves extensive database schema modifications, corresponding updates to API routes for content and strategy creation, and the introduction of new data validation schemas. The changes aim to provide a more robust and detailed framework for defining and managing SEO strategies, while also simplifying the presentation of strategy information in the UI.

Highlights

  • Database Schema Updates: New columns secondary_keywords, strategy_id, keyword_universe, and llm_queries were added to seo_content_draft, seo_content, and seo_strategy tables, along with a foreign key constraint.
  • API Endpoint Enhancements: Content listing and creation endpoints were updated to support secondaryKeywords and strategyId, while strategy creation now accepts keywordUniverse and llmQueries.
  • New Keyword Parsing Schemas: Introduced comprehensive schemas for managing strategy-related keywords, including status, LLM queries, sources, categories, and a full keyword universe.
  • UI Simplification: The StrategyCard component was refactored to remove the display of strategy status and phase badges, streamlining the user interface.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • apps/seo/src/routes/_authed/$organizationSlug/$projectSlug/strategies/-components/strategy-card.tsx
    • Removed capitalize utility import.
    • Removed UI elements responsible for displaying strategy status and phase badges.
  • packages/api-seo/src/routes/content.ts
    • Added secondaryKeywords to the content listing schema.
    • Included strategyId and secondaryKeywords in the content creation process.
  • packages/api-seo/src/routes/strategy.ts
    • Added keywordUniverse and llmQueries fields to the strategy creation endpoint.
  • packages/core/src/schemas/keyword-parsers.ts
    • Defined strategyItemStatusSchema and STRATEGY_ITEM_STATUSES.
    • Created strategyLlmQueriesSchema for structured LLM query tracking.
    • Introduced strategyKeywordSourceSchema to specify keyword origins.
    • Defined strategyKeywordCategorySchema and STRATEGY_KEYWORD_CATEGORIES.
    • Implemented strategyKeywordUniverseSchema for comprehensive keyword management.
  • packages/db/migrations/0023_mean_joshua_kane.sql
    • Added secondary_keywords column to seo_content_draft.
    • Added strategy_id and secondary_keywords columns to seo_content.
    • Added keyword_universe and llm_queries columns to seo_strategy.
    • Established a foreign key constraint for seo_content.strategy_id referencing seo_strategy.id.
  • packages/db/migrations/meta/_journal.json
    • Registered the new database migration 0023_mean_joshua_kane.
  • packages/db/src/operations/seo/content-operations.ts
    • Updated listContentDraftsWithLatestSnapshot to include secondaryKeywords.
  • packages/db/src/schema/seo/content-draft-schema.ts
    • Added a secondaryKeywords column as a text array with a default empty array.
  • packages/db/src/schema/seo/content-schema.ts
    • Imported seoStrategy schema.
    • Added strategyId as a UUID foreign key referencing seoStrategy.
    • Added secondaryKeywords as a text array with a default empty array.
    • Defined a strategy relation for seoContent.
  • packages/db/src/schema/seo/strategy-schema.ts
    • Imported strategyKeywordUniverseSchema and strategyLlmQueriesSchema.
    • Added keywordUniverse and llmQueries as JSONB columns to the seoStrategy schema.
Activity
  • The pull request was opened by ElasticBottle.
  • New database migration 0023_mean_joshua_kane.sql was added to update content and strategy tables.
  • API routes for content and strategy were modified to support new data fields.
  • Core schemas for keyword parsing were introduced to define new data structures.
  • A UI component (strategy-card.tsx) was updated to reflect schema changes and simplify display.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several schema updates related to strategies and content, and propagates these changes through the database, API, and core packages. Key changes include adding keywordUniverse and llmQueries to the seo_strategy table, and secondaryKeywords and strategyId to content-related tables. The corresponding Drizzle schemas, API endpoints, and operations have been updated to support these new fields. New Arktype schemas are also added for validating the new JSONB data structures. The changes are consistent and well-executed across the codebase. I have reviewed the changes and found no issues.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 17, 2026

Open in StackBlitz

pnpm add https://pkg.pr.new/@rectangular-labs/emails@408
pnpm add https://pkg.pr.new/@rectangular-labs/loro-file-system@408
pnpm add https://pkg.pr.new/@rectangular-labs/result@408

commit: cd1bda2

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Extends the SEO strategy/content data model to persist strategy keyword research artifacts, associate published content with a strategy, and support secondary keywords end-to-end.

Changes:

  • Add keywordUniverse and llmQueries JSONB columns to seo_strategy, typed from core ArkType schemas.
  • Add strategyId FK + secondaryKeywords array columns to seo_content, and secondaryKeywords to seo_content_draft.
  • Wire new fields through DB operations and API routes; adjust strategy card UI layout.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/db/src/schema/seo/strategy-schema.ts Adds JSONB columns for strategy keyword universe and LLM queries (typed).
packages/db/src/schema/seo/content-schema.ts Adds strategyId FK and secondaryKeywords to published content + relation to strategy.
packages/db/src/schema/seo/content-draft-schema.ts Adds secondaryKeywords to drafts.
packages/db/src/operations/seo/content-operations.ts Includes secondaryKeywords in draft listing projection.
packages/db/migrations/meta/_journal.json Registers migration 0023_mean_joshua_kane.
packages/db/migrations/meta/0023_snapshot.json Captures updated DB snapshot reflecting new columns/FK.
packages/db/migrations/0023_mean_joshua_kane.sql Adds new columns and FK constraint at the SQL level.
packages/core/src/schemas/keyword-parsers.ts Introduces ArkType schemas for strategy keyword universe + LLM query sets.
packages/api-seo/src/routes/strategy.ts Passes keywordUniverse/llmQueries through strategy creation.
packages/api-seo/src/routes/content.ts Exposes secondaryKeywords in list output and persists new fields on publish.
apps/seo/src/routes/_authed/$organizationSlug/$projectSlug/strategies/-components/strategy-card.tsx Removes the header badge row (status/phase badges) from the card layout.

You can also share your feedback on Copilot code review. Take the survey.

@github-actions
Copy link
Contributor

Cloudflare Preview URL for WWW 🎈 : https://pr-408.rectangularlabs.com (custom domain)
Cloudflare Preview URL for SEO 🎈 : https://pr-408.fluidposts.com (custom domain)
Cloudflare Preview URL for SEO WWW 🎈 : https://www-pr-408.fluidposts.com (custom domain)
Cloudflare Preview URL for SEO Contact 🎈 : https://contact-pr-408.fluidposts.com (custom domain)

@ElasticBottle ElasticBottle merged commit cb6cbff into main Mar 17, 2026
13 checks passed
@ElasticBottle ElasticBottle deleted the winston/update-strategy-schema branch March 17, 2026 12:59
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