You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consistent messaging is important throughout the codebase. Follow these guidelines for errors, logs, and user-facing messages:
126
+
127
+
#### Error messages
128
+
- Lowercase for internal errors and logs: `failed to start session` (no ending period)
129
+
- Uppercase for user-facing errors: `Requested object does not exist. Specify your request.` (with ending period)
130
+
- Omit articles ("a", "an", "the") for brevity: use `failed to update clone` not `failed to update the clone`
131
+
- Be specific and actionable whenever possible
132
+
- For variable interpolation, use consistent formatting: `failed to find clone: %s`
133
+
134
+
#### CLI output
135
+
- Use concise, action-oriented language
136
+
- Present tense with ellipsis for in-progress actions: `Creating clone...`
137
+
- Ellipsis (`...`) indicates an ongoing process where the user should wait
138
+
- Always follow up with a completion message when the operation finishes
139
+
- Past tense with period for results: `Clone created successfully.`
140
+
- Include relevant identifiers (IDs, names) in output
141
+
142
+
#### Progress indication
143
+
- Use ellipsis (`...`) to indicate that an operation is in progress and the user should wait
144
+
- For longer operations, consider providing percentage or step indicators: `Cloning database... (25%)`
145
+
- When an operation with ellipsis completes, always provide a completion message without ellipsis
146
+
- Example sequence:
147
+
```
148
+
Creating clone...
149
+
Clone "test-clone" created successfully.
150
+
```
151
+
152
+
#### UI messages
153
+
- Be consistent with terminology across UI and documentation
154
+
- For confirmations, use format: `{Resource} {action} successfully.`
155
+
- For errors, provide clear next steps when possible
156
+
- Use sentence case for all messages (capitalize first word only)
157
+
158
+
#### Commit messages
159
+
- Start with lowercase type prefix: `fix:`, `feat:`, `docs:`, etc.
160
+
- Use imperative mood: `add feature` not `added feature`
161
+
- Provide context in the body if needed
162
+
124
163
### Documentation styleguide
125
164
Documentation for Database Lab Engine and additional components is hosted at https://postgres.ai/docs and is maintained in this GitLab repo: https://gitlab.com/postgres-ai/docs.
0 commit comments