Skip to content

Commit d78164f

Browse files
committed
Developer - Laptop
PR_26171_004-messages-emotion-segments
1 parent b0fb553 commit d78164f

23 files changed

Lines changed: 5039 additions & 787 deletions
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
-- Game Foundry Studio DEV database DDL
2+
-- Group: Messages
3+
-- Ownership: docs_build/database/ddl/messages.sql
4+
-- Target DEV database: gamefoundry_dev
5+
-- Scope: executable grouped table DDL for active server API migration.
6+
-- Authoritative key values are generated by the server/API layer unless a later DEV-only seed exception explicitly applies.
7+
-- Owned tables: messages_categories, messages_emotion_profiles, messages_records
8+
CREATE TABLE IF NOT EXISTS messages_categories (
9+
key text PRIMARY KEY,
10+
"name" text NOT NULL UNIQUE,
11+
"active" boolean NOT NULL DEFAULT true,
12+
"createdAt" timestamptz NOT NULL DEFAULT now(),
13+
"updatedAt" timestamptz NOT NULL DEFAULT now(),
14+
"createdBy" text NOT NULL REFERENCES users(key),
15+
"updatedBy" text NOT NULL REFERENCES users(key)
16+
);
17+
18+
CREATE TABLE IF NOT EXISTS messages_emotion_profiles (
19+
key text PRIMARY KEY,
20+
"name" text NOT NULL UNIQUE,
21+
"description" text NOT NULL DEFAULT '',
22+
"volume" numeric NOT NULL DEFAULT 1,
23+
"pitch" numeric NOT NULL DEFAULT 1,
24+
"rate" numeric NOT NULL DEFAULT 1,
25+
"pauseBeforeMs" integer NOT NULL DEFAULT 0,
26+
"pauseAfterMs" integer NOT NULL DEFAULT 0,
27+
"active" boolean NOT NULL DEFAULT true,
28+
"createdAt" timestamptz NOT NULL DEFAULT now(),
29+
"updatedAt" timestamptz NOT NULL DEFAULT now(),
30+
"createdBy" text NOT NULL REFERENCES users(key),
31+
"updatedBy" text NOT NULL REFERENCES users(key)
32+
);
33+
34+
CREATE TABLE IF NOT EXISTS messages_records (
35+
key text PRIMARY KEY,
36+
"name" text NOT NULL,
37+
"categoryKey" text NOT NULL REFERENCES messages_categories(key),
38+
"emotionProfileKey" text NOT NULL REFERENCES messages_emotion_profiles(key),
39+
"messageText" text NOT NULL,
40+
"notes" text NOT NULL DEFAULT '',
41+
"active" boolean NOT NULL DEFAULT true,
42+
"createdAt" timestamptz NOT NULL DEFAULT now(),
43+
"updatedAt" timestamptz NOT NULL DEFAULT now(),
44+
"createdBy" text NOT NULL REFERENCES users(key),
45+
"updatedBy" text NOT NULL REFERENCES users(key)
46+
);
47+
48+
CREATE INDEX IF NOT EXISTS idx_messages_records_categorykey ON messages_records ("categoryKey");
49+
CREATE INDEX IF NOT EXISTS idx_messages_records_emotionprofilekey ON messages_records ("emotionProfileKey");
50+
CREATE INDEX IF NOT EXISTS idx_messages_records_createdby ON messages_records ("createdBy");
51+
CREATE INDEX IF NOT EXISTS idx_messages_records_updatedby ON messages_records ("updatedBy");

docs_build/database/dml/DML_INDEX.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Direct SQL setup is intentionally narrow. Account DEV users now require server-s
1414
| Game Design | `game-design.sql` | Server-seed-owned | Server-side seed API |
1515
| Game Journey | `game-journey.sql` | Server-seed-owned | Server-side seed API |
1616
| Game Workspace | `game-workspace.sql` | Server-seed-owned | Server-side seed API |
17+
| Messages | `messages.sql` | Server-seed-owned | Messages Local API/server-side SQLite service |
1718
| Objects | `objects.sql` | Server-seed-owned | Server-side seed API |
1819
| Palette | `palette.sql` | Server-seed-owned | Server-side seed API |
1920
| Support Tickets | `support-tickets.sql` | Server-seed-owned | Admin Site Setup/server-side seed API |
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-- Game Foundry Studio DEV database DML / seed review
2+
-- Group: Messages
3+
-- Ownership: docs_build/database/dml/messages.sql
4+
-- Runtime setup/seed operations for this group must run through server-side APIs.
5+
-- Browser pages must not directly seed authoritative DB records.
6+
-- Owned tables: messages_categories, messages_emotion_profiles, messages_records
7+
8+
-- DML status: Server-seed-owned.
9+
-- Setup is performed through the Messages Local API / server-side SQLite service for this PR.
10+
-- Browser pages must not seed authoritative records.
11+
-- The server/API layer generates all keys and audit fields.
12+
-- This SQL file intentionally has no direct INSERT statements because direct SQL would bypass key/audit ownership.
13+
-- Direct SQL setup for this group remains deferred until a later migration-runner PR explicitly owns it.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"group": "Messages",
3+
"groupKey": "messages",
4+
"owner": "docs_build/database/seed",
5+
"serverSideSeedRequired": true,
6+
"browserAuthoritativeKeyGenerationAllowed": false,
7+
"tables": {
8+
"messages_categories": [
9+
"Dialog",
10+
"Narration",
11+
"Quest",
12+
"Tutorial",
13+
"Combat",
14+
"System",
15+
"Achievement",
16+
"Notification"
17+
],
18+
"messages_emotion_profiles": [
19+
"Calm",
20+
"Urgent",
21+
"Whisper",
22+
"Angry",
23+
"Excited",
24+
"Sad",
25+
"Mysterious"
26+
],
27+
"messages_records": []
28+
},
29+
"note": "Seed names are applied by the server-side Messages SQLite service. Browser pages must not seed authoritative records."
30+
}
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
If your goal is **maximum throughput**, I would have the three chats play different roles.
2+
3+
## Master Control
4+
5+
Don't build anything here.
6+
7+
This chat should answer:
8+
9+
```text
10+
What should be built next?
11+
What is the priority?
12+
What are the requirements?
13+
What PR number is next?
14+
```
15+
16+
Think of it as:
17+
18+
```text
19+
Product Manager
20+
Architect
21+
CTO
22+
```
23+
24+
Not developer.
25+
26+
---
27+
28+
## PC Chat
29+
30+
Give it ownership of a workstream.
31+
32+
Example:
33+
34+
```text
35+
GFS - Development A
36+
37+
Owns:
38+
- Game Journey
39+
- Game Hub
40+
- Progress
41+
- Publish
42+
- Share
43+
```
44+
45+
When you enter:
46+
47+
```text
48+
NEXT
49+
```
50+
51+
it keeps building in that area.
52+
53+
---
54+
55+
## Laptop Chat
56+
57+
Give it a different workstream.
58+
59+
Example:
60+
61+
```text
62+
GFS - Development B
63+
64+
Owns:
65+
- Audio
66+
- MIDI
67+
- Messages
68+
- Events
69+
- AI
70+
```
71+
72+
When you enter:
73+
74+
```text
75+
NEXT
76+
```
77+
78+
it keeps building there.
79+
80+
---
81+
82+
## What should Master Control focus on?
83+
84+
Right now, for GFS, I would prioritize:
85+
86+
### 1. Tool Completion
87+
88+
Not IST.
89+
90+
You can't really test in IST if the tools aren't usable yet.
91+
92+
Current value chain:
93+
94+
```text
95+
Tool Completion
96+
97+
Game Creation
98+
99+
DEV Testing
100+
101+
IST
102+
103+
UAT
104+
105+
PROD
106+
```
107+
108+
So I'd keep IST mostly as infrastructure work and focus development on tool completion.
109+
110+
---
111+
112+
### 2. Create Tool Ownership Map
113+
114+
Master Control should assign ownership:
115+
116+
```text
117+
PC
118+
Game Journey
119+
Game Hub
120+
Publish
121+
Share
122+
123+
Laptop
124+
Audio
125+
MIDI
126+
Events
127+
Messages
128+
```
129+
130+
This reduces merge conflicts dramatically.
131+
132+
---
133+
134+
### 3. Create Branch Rules
135+
136+
Every feature gets:
137+
138+
```text
139+
feature/<tool-name>
140+
```
141+
142+
Examples:
143+
144+
```text
145+
feature/messages-tool
146+
feature/audio-tool
147+
feature/game-hub
148+
feature/progress-tracking
149+
```
150+
151+
Never have both PCs working in the same tool at the same time.
152+
153+
---
154+
155+
## What I can do
156+
157+
I can help you turn Master Control into a scheduler.
158+
159+
For example, in Master Control you can ask:
160+
161+
```text
162+
Given everything we know about GFS:
163+
164+
What should PC build next?
165+
What should Laptop build next?
166+
167+
Generate the next PR for each.
168+
```
169+
170+
Then Master Control outputs:
171+
172+
```text
173+
PC:
174+
PR_26171_002-game-hub-progress
175+
176+
Laptop:
177+
PR_26171_003-messages-tool-mvp
178+
```
179+
180+
You paste those into the two development chats.
181+
182+
Both Codex sessions work simultaneously.
183+
184+
Then when PRs come back, Master Control decides:
185+
186+
```text
187+
Merge
188+
Reject
189+
Revise
190+
Queue next PR
191+
```
192+
193+
That is probably the fastest path to doubling throughput without creating chaos.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# PR_26171_002 Messages Manual Validation Notes
2+
3+
Manual validation was performed through the targeted Playwright run and direct Local API probes.
4+
5+
PASS - Messages page loads at `/tools/messages/index.html`.
6+
7+
PASS - Category seeds are visible:
8+
- Dialog
9+
- Narration
10+
- Quest
11+
- Tutorial
12+
- Combat
13+
- System
14+
- Achievement
15+
- Notification
16+
17+
PASS - Emotion Profile seeds are visible:
18+
- Calm
19+
- Urgent
20+
- Whisper
21+
- Angry
22+
- Excited
23+
- Sad
24+
- Mysterious
25+
26+
PASS - Category management:
27+
- Added `Barks`.
28+
- Renamed `Barks` to `World Barks`.
29+
- Disabled `World Barks`.
30+
31+
PASS - Emotion Profile management:
32+
- Added `Robot`.
33+
- Edited `Robot` description and configuration values.
34+
- Disabled `Robot`.
35+
36+
PASS - Message validation:
37+
- Empty save displays visible errors for Message Name, Category, Emotion Profile, and Message Text.
38+
39+
PASS - Message create:
40+
- Created `Forest Warning`.
41+
- Selected Dialog category and Urgent emotion profile.
42+
- Stored multiline message text exactly as entered.
43+
44+
PASS - Message update:
45+
- Updated `Forest Warning` to `Forest Warning Updated`.
46+
- Updated Message Text without parser, markup, tag, or conversion behavior.
47+
48+
PASS - Local API / SQLite persistence:
49+
- Direct API probe created a message.
50+
- Restarted the Local API against the same SQLite file.
51+
- Confirmed the message was still readable with exact multiline text.
52+
53+
PASS - No delete endpoints:
54+
- `DELETE /api/messages/messages/:key` returned `404`.
55+
56+
PASS - Theme V2 rendering:
57+
- Messages page uses Theme V2 classes and shared partials.
58+
- No inline styles, style blocks, inline event handlers, tool-local CSS, or page-local CSS were introduced.
59+
60+
Out-of-scope confirmation:
61+
- No Text To Speech implementation.
62+
- No audio playback.
63+
- No voice selection.
64+
- No AI voices.
65+
- No speech preview.
66+
- No dialog trees.
67+
- No quest/event integration.
68+
- No localization or translation behavior.

0 commit comments

Comments
 (0)