Skip to content

Show plan types in UI + fix tags column removal#82

Merged
HamptonMakes merged 1 commit intomainfrom
plan-types-ui
Apr 6, 2026
Merged

Show plan types in UI + fix tags column removal#82
HamptonMakes merged 1 commit intomainfrom
plan-types-ui

Conversation

@HamptonMakes
Copy link
Copy Markdown
Collaborator

Makes plan types visible end-to-end:

  • Type badge on homepage plan cards
  • Type badge on plan show page header
  • Type filter pills on homepage (only shown when plan types exist)
  • Removes stale after_initialize { self.tags ||= [] } since the tags column was dropped by the tag model migration

@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4781811864

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

has_many :notifications, dependent: :destroy

after_initialize { self.tags ||= [] }
after_initialize { self.metadata ||= {} }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep tags default until tags field is fully removed

Dropping the tags initializer here changes newly created plans from tags: [] to tags: null while the rest of the app still treats tags as a live field (the schema still has coplan_plans.tags, and the API continues to read/write tags). In practice, a client that creates a plan without sending tags now gets a nullable shape instead of an array and can break if it assumes iterable tags based on the documented/update contract. Keep the default ([]) in place until the column and API exposure are removed together.

Useful? React with 👍 / 👎.

- Add plan type badge to plan cards on homepage
- Add plan type badge to plan show page header
- Add plan type filter pills on homepage
- Remove stale tags after_initialize (column was dropped by tag model migration)
- Add badge--type CSS style
@HamptonMakes
Copy link
Copy Markdown
Collaborator Author

Re: Codex review on tags initializer — the tags JSON column was removed by the Tag model PR (#79), which replaced it with a coplan_plan_tags join table. The column no longer exists in the schema, so keeping after_initialize { self.tags ||= [] } causes a NoMethodError. This removal is correct.

@HamptonMakes HamptonMakes merged commit 0c0ca44 into main Apr 6, 2026
5 checks passed
@HamptonMakes HamptonMakes deleted the plan-types-ui branch April 6, 2026 15:24
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