setfaction: add Max Ally/KOS/Apprehensive and color-code the CoV Faction cell - #275
Merged
Merged
Conversation
- Add "Max Ally", "KOS", and "Apprehensive" faction choices; reorder the list best (Max Ally) to worst (KOS). - On set, color the CoV Faction sheet cell by standing: red for KOS/Scowling/ Threatening, green for Max Ally/Ally/Warmly, yellow otherwise. Adds SheetPublicAccountService.setBotCellBackground(), which sets a single cell's background via the Google Sheets cell API. Coloring failures are logged and noted in the reply but don't fail the value update. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BWXRmPbtEz35wquwFd8Cu7
Green is now Max Ally / Ally only; Warmly falls through to yellow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BWXRmPbtEz35wquwFd8Cu7
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BWXRmPbtEz35wquwFd8Cu7
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.
Summary
Enhances
/bot setfaction(from #274):Max Ally,KOS, andApprehensiveto the faction list, reordered best (Max Ally) → worst (KOS), withUnknownlast.KOS,Scowling,ThreateningMax Ally,AllyWarmly)Changes
setfaction-subcommand.ts: expandedFACTION_LEVELS; added afactionBackgroundColor()mapping; after recording the value it colors theCoV Factioncell.public-accounts-sheet.ts: newsetBotCellBackground(botName, column, color)that sets a single cell's background via the google-spreadsheet cell API (loadCellsover just that cell →getCell→backgroundColor→saveUpdatedCells).Coloring runs after the value is written and is resilient: if it fails (e.g. permissions), the failure is logged and noted in the reply, but the faction value is still recorded.
Testing
yarn tsc— clean.yarn test:ci— 84 tests pass.CoV Factioncell the expected color.🤖 Generated with Claude Code