Improvement
April 6, 20262 min read
Expression Page Save Fix
Expression
✨ What's Improved
Fixed a critical error that prevented saving changes on the Visual Style card within the Expression section. Users were seeing: "Could not find the 'platform_voice_rules' column of 'brand_kit_expression' in the schema cache."
The Problem
The Expression page's save function was sending fields to the database that didn't exist as columns:
platform_voice_rules— referenced in the save payload but missing from the tablesituational_tone_guides— same issuevisual_style_1throughvisual_style_5— individual slot columns that never existed (data is stored in a singlevisual_styleJSONB column)
This caused every save attempt on the Visual Style card to fail silently or with an error toast.
The Fix
- Database migration — Added the missing
platform_voice_rulesandsituational_tone_guidescolumns tobrand_kit_expressionas JSONB with sensible defaults - Save logic refactor — Updated
ExpressionPage.performSave()to properly serialize visual style slots 1-5 into a singlevisual_styleJSONB object and verbal style slots intoverbal_style - Load logic update — Updated data loading to unpack the JSONB objects back into individual slot state variables
How to Verify
- Navigate to any Brand Kit → Expression → Visual Style
- Add or edit content in any visual style slot
- Save — the toast should confirm success without errors
- Reload the page — your changes should persist