-
Notifications
You must be signed in to change notification settings - Fork 0
Add OG metadata for home page #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this 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 explicitStoryDiscoveryOutputannotation improves clarity and satisfies strict ESLint rules around unsafe usage, assumingagents.discovery.runis correctly typed. Ifrunalready returnsStoryDiscoveryOutput, 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 ofdiscoveryResulttoStoryDiscoveryOutputis 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 explicitDecompositionAgentResultannotation 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
TheEvaluationOutputannotation 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
AnnotatingevaluationasEvaluationOutputaligns with the goal of avoidingno-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-levelmetadatausing Next.js'Metadatatype 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 addimagesin theopenGraphfield to control link previews more precisely.
Summary of changes
Overview of Changes
- Tightened typing for agent results in Trigger tasks by annotating:
discoveryResultasStoryDiscoveryOutputindiscover-stories.ts.decompositionResultasDecompositionAgentResultinstory-decomposition.ts.evaluationasEvaluationOutputintest-story.ts.
- Added a page-level
metadataexport inapps/web/app/page.tsxto configure Open Graph and basic SEO metadata for the home page using the "testing in the age of vibe" slogan andhttps://usekyoto.comURL. - Left existing runtime logic and task orchestration unchanged while improving type clarity and SEO metadata configuration.
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
metadataexport toapps/web/app/page.tsxwith Open Graph title/description based on the "testing in the age of vibe" slogan and thehttps://usekyoto.comURL.@typescript-eslint/no-unsafe-*rules are satisfied without weakening type safety:discover-stories.ts:StoryDiscoveryOutputforagents.discovery.run.story-decomposition.ts:DecompositionAgentResultforagents.decomposition.run.test-story.ts:EvaluationOutputforagents.evaluation.run.Verification
StoryDiscoveryOutput/DecompositionAgentResult/EvaluationOutputannotations in Trigger tasks because the sharedAgenttype currently uses a genericz.ZodSchemaand itsrunmethod would otherwise returnunknown, which reintroduces@typescript-eslint/no-unsafe-*warnings when accessing fields likestoriesandstatus.metadatafor the home page withoutmetadataBaseoropenGraph.imagesto 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.