feat(turd): show what each choice changes + recipe-comparison diffs - #70
Merged
Conversation
makeTestDb generated DDL straight from schema.ts, so a test db never recorded the drizzle migration journal. The first incremental ALTER migration then re-added a column the push had already created. Provision test dbs the way production does — apply the bundled migrations — so tests exercise the real path and incremental migrations don't collide.
The assistant and the TURD page only knew about branches that *replace* a recipe (the turd_replacements table), so branches that unlock a brand-new recipe were invisible — the agent reported moondrop-upgrade as a single choice when it actually has three. - turdChoices tool + recipeInfo enrichment walk the tech-prerequisite graph, so the agent sees every branch: its description, the recipes it swaps (old->new) or newly unlocks, and its modules. - Import tech descriptions (new technologies.description column). - /turd page: each choice lists its concrete recipe changes with icons and descriptions instead of a bare 'N recipes' count; effect pills color-coded. - Recipe-comparison hover (reusable for Py recipe tiers): in/out diff, colored time, base per-second throughput with % change. A choice's module is applied to a swapped recipe's rate only when it runs in the affected building (skipped for building-construction recipes); productivity skips ignored-by-productivity outputs like barrels.
Sending a message with no key configured returned a 500 the UI never surfaced, so the conversation just died silently. Show an up-front banner (linking to Settings) when no key is stored or in the env, and render the request error if a send fails anyway.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The assistant and the TURD page only understood branches that replace a recipe (the
turd_replacementstable), so branches that instead unlock a brand-new recipe were invisible. Asked "which Moondrop TURD is best?", the assistant confidently reported a single choice — the master actually has three (Copper addition,Moon light,Carbon capture). The/turdpage had the same blind spot and showed each choice as an opaque "N recipes" count.What
Assistant / data
turdChoicestool +recipeInfo.turdenrichment walk the tech-prerequisite graph, so the agent sees every branch of a master: its description, the recipes it swaps (old→new) or newly unlocks, and its modules. Prompt updated to consult it and never assume a single choice.technologies.descriptioncolumn + migration)./turdpage+ newunlocks) with icons and the master/branch descriptions, instead of a bare count.Recipe-comparison hover (reusable
RecipeDiff, also ready for Py recipe tiers)ignored_by_productivityoutputs (barrels/catalysts); speed scales all outputs.Also
fix(db): the schema change surfaced a latent issue —makeTestDbbuilt tables by pushingschema.tswhile production applies migrations, so the first incremental ALTER collided. Test DBs now provision through the real migration path.fix(assistant): sending with no OpenRouter key returned a 500 the UI swallowed (the conversation died silently). Now an up-front banner (linking to Settings) shows when no key is set, and send errors render inline.Verify
vp checkclean;vp test170 passing.moondrop-upgrade's three branches + descriptions; verified live: the/turddetail, recipe-diff tooltips (incl. the productivity-only-where-it-applies and barrel-exclusion behavior), and the no-key banner.Docs updated (
README.md,docs/ai-assistant.md).