Skip to content

feat: AI-assisted delivery bootstrap with New Product Badge feature#696

Open
vitttoria15-study wants to merge 12 commits into
grandnode:developfrom
vitttoria15-study:feature/ai-delivery-bootstrap
Open

feat: AI-assisted delivery bootstrap with New Product Badge feature#696
vitttoria15-study wants to merge 12 commits into
grandnode:developfrom
vitttoria15-study:feature/ai-delivery-bootstrap

Conversation

@vitttoria15-study
Copy link
Copy Markdown

Summary

This PR introduces an AI-assisted delivery workflow bootstrap and implements the New Product Badge feature for the product details page.


AI-Powered Delivery Bootstrap

  • Added docs/ai-delivery/ documentation covering project overview, development guide, feature workflow, and architecture notes
  • Integrated Superpowers skill-driven agentic workflow for structured, plan-first development
  • Established a repeatable AI delivery process: brainstorm → plan → TDD → implement → verify → PR

New Product Badge Feature

Displays a green "New" badge on the product details page for products created within the last 30 days.

Implementation:

  • ProductDetailsModel — added computed bool ShowNewBadge { get; set; }
  • GetProductDetailsPageHandler — populates ShowNewBadge from product.CreatedOnUtc >= DateTime.UtcNow.AddDays(-30), alongside the existing Flag assignment; no service, domain, or cache changes
  • Grand.Web/Views/Product/ProductLayout.Simple.cshtml — renders badge block after the existing Flag block
  • Theme.Modern/Views/Modern/Product/ProductLayout.Simple.cshtml — adds both Flag and ShowNewBadge blocks (theme previously had neither)

Tests & Validation

  • 4 unit tests in ProductNewBadgeTests.cs: property existence, created-today, within-30-days, and 31-days-ago boundary cases
  • TDD approach: failing test written before property was added
  • Manually verified: badge renders for new products, absent for products older than 30 days
  • Build clean; all tests pass

AI Workflow Notes

  • Implemented via plan-driven agentic session (docs/superpowers/plans/2026-05-22-new-product-badge.md)
  • Each task tracked with checkboxes; implementation followed the plan step-by-step
  • Smoke-tested locally using a temporary ShowNewBadge = true override to validate template rendering before restoring date logic

@KrzysztofPajak
Copy link
Copy Markdown
Member

@vitttoria15-study “Mark as new” already exists on the product. I think this is a duplicate feature.

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