Skip to content

Conversation

@charliecreates
Copy link
Contributor

@charliecreates charliecreates bot commented Dec 1, 2025

Add Open Graph metadata to the home page using the new "testing in the age of vibe" slogan, and tighten types in Trigger tasks so agent results are fully typed.

Changes

  • Add a page-level metadata export to apps/web/app/page.tsx with Open Graph title/description based on the "testing in the age of vibe" slogan and the https://usekyoto.com URL.
  • Annotate agent result variables in Trigger tasks so ESLint's @typescript-eslint/no-unsafe-* rules are satisfied without weakening type safety:
    • discover-stories.ts: StoryDiscoveryOutput for agents.discovery.run.
    • story-decomposition.ts: DecompositionAgentResult for agents.decomposition.run.
    • test-story.ts: EvaluationOutput for agents.evaluation.run.

Verification

# Lint: all packages (Turbo)
$ pnpm run lint

# TypeScript: all packages (Turbo)
$ pnpm run typecheck
  • Both commands pass with no lint warnings (max-warnings=0) and no TypeScript errors.
  • Self-review: kept explicit StoryDiscoveryOutput / DecompositionAgentResult / EvaluationOutput annotations in Trigger tasks because the shared Agent type currently uses a generic z.ZodSchema and its run method would otherwise return unknown, which reintroduces @typescript-eslint/no-unsafe-* warnings when accessing fields like stories and status.
  • Self-review: intentionally left OG metadata for the home page without metadataBase or openGraph.images to keep this change scoped to the requested slogan/OG text; wiring a global base URL and social image will be easier to review as a separate marketing/SEO follow-up.

Refs KYO-56.

@vercel
Copy link

vercel bot commented Dec 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
kyoto Building Building Preview Comment Dec 1, 2025 10:17am

Copy link
Contributor Author

@charliecreates charliecreates bot left a comment

Choose a reason for hiding this comment

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

The diff primarily introduces stronger type annotations for agent results and adds well-structured Next.js metadata, both of which are directionally solid. There are no correctness or performance regressions evident in the modified code. The main opportunities are minor readability improvements (avoiding awkward line breaks) and reducing duplication in the new metadata definition. None of these issues are blocking, but addressing them would make the code easier to maintain.

Additional notes (6)
  • Maintainability | apps/trigger/src/tasks/discover-stories.ts:86-89
    The explicit StoryDiscoveryOutput annotation improves clarity and satisfies strict ESLint rules around unsafe usage, assuming agents.discovery.run is correctly typed. If run already returns StoryDiscoveryOutput, this annotation is slightly redundant but harmless; if it returns a broader type, this will enforce safer downstream handling. No functional issues here, just be aware that if the agent return type changes in the future, this spot will need updating as well.

  • Maintainability | apps/trigger/src/tasks/discover-stories.ts:86-89
    The explicit annotation of discoveryResult to StoryDiscoveryOutput is consistent with the PR intent to satisfy @typescript-eslint/no-unsafe-* rules without weakening type safety, and it makes the downstream usage clearer.

One potential improvement is to consider whether agents.discovery.run can be generically typed (e.g., agents.discovery.run<StoryDiscoveryOutput>(...)) at the call site or in its definition. That would let you keep the stronger type guarantee while avoiding possible divergence between the actual return type and the annotation here if the agent implementation changes in the future.

  • Maintainability | apps/trigger/src/tasks/story-decomposition.ts:64-68
    Same as with the discovery task, the explicit DecompositionAgentResult annotation is a good step to eliminate unsafe-usage lint suppressions and make the result shape clear.

However, if the agents.decomposition.run function already has a well-defined generic return type, hoisting the type parameter to the call (or enforcing it at the agent definition) can be more future-proof than relying on a separate annotation here that might become stale if the agent evolves.

  • Maintainability | apps/trigger/src/tasks/test-story.ts:170-173
    The EvaluationOutput annotation is consistent with your other task changes and helps ensure the evaluation result is handled in a type-safe way throughout the rest of the task. There are no apparent logical or performance issues introduced here.

  • Maintainability | apps/trigger/src/tasks/test-story.ts:170-173
    Annotating evaluation as EvaluationOutput aligns with the goal of avoiding no-unsafe-* issues and documents the expected structure of the evaluation result.

As with the other agents, if agents.evaluation.run can be parameterized or its definition already encodes EvaluationOutput, you may get stronger guarantees by tying the type to the agent API instead of relying on a separate annotation here. That would help prevent drift if the evaluation agent's output schema changes later on.

  • Maintainability | apps/web/app/page.tsx:1-1
    Defining page-level metadata using Next.js' Metadata type is the correct approach in the app router and will enable proper Open Graph tags for social sharing. One potential enhancement is to reuse the same title/description strings to avoid duplication and keep them in sync if you update the slogan later; right now, the literal strings are repeated three times. Also consider whether you want to add images in the openGraph field to control link previews more precisely.
Summary of changes

Overview of Changes

  • Tightened typing for agent results in Trigger tasks by annotating:
    • discoveryResult as StoryDiscoveryOutput in discover-stories.ts.
    • decompositionResult as DecompositionAgentResult in story-decomposition.ts.
    • evaluation as EvaluationOutput in test-story.ts.
  • Added a page-level metadata export in apps/web/app/page.tsx to configure Open Graph and basic SEO metadata for the home page using the "testing in the age of vibe" slogan and https://usekyoto.com URL.
  • Left existing runtime logic and task orchestration unchanged while improving type clarity and SEO metadata configuration.

@charliecreates charliecreates bot removed the request for review from CharlieHelps December 1, 2025 10:19
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