feat(app-dev): sync error hints, flatEntity labels, dev-mode summary UI, and docs (#21252)
Split out of #21240 — all remaining app-dev improvements. Stacked on #21251 (review/merge that first). - Actionable recovery hints on failed syncs; unified diff renderer; `--dry-run` guard. - Return `flatEntity` on update/delete sync actions and unify the diff label. - Summarize the dev-mode entity list unless `--verbose`. - Docs: syncing & recovery guide + dry-run + open-an-issue prompt. - Live execution mode for synced logic functions; clearer manifest warnings. <img width="1018" height="700" alt="image" src="https://github.com/user-attachments/assets/5e9ce19e-0f1d-4f99-8524-4e118bde932b" />
This commit is contained in:
@@ -45,7 +45,7 @@ export class AppDevCommand {
|
||||
|
||||
orchestratorState.onChange = () => uiStateManager.notify();
|
||||
|
||||
const { unmount } = await renderDevUI(uiStateManager);
|
||||
const { unmount } = await renderDevUI(uiStateManager, options.verbose);
|
||||
|
||||
this.unmountUI = unmount;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { formatPath } from '@/cli/utilities/file/file-path';
|
||||
import chalk from 'chalk';
|
||||
import type { Command } from 'commander';
|
||||
import { SyncableEntity } from 'twenty-shared/application';
|
||||
import { EntityAddCommand } from './add';
|
||||
@@ -25,6 +26,14 @@ export const registerDevCommands = (program: Command): void => {
|
||||
dryRun?: boolean;
|
||||
},
|
||||
) => {
|
||||
if (options.dryRun && !options.once) {
|
||||
console.warn(
|
||||
chalk.yellow(
|
||||
'--dry-run only applies with --once. Ignoring it; run `yarn twenty dev --once --dry-run` to preview changes.',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
const commonOptions = {
|
||||
appPath: formatPath(appPath),
|
||||
verbose: options.verbose || options.debug,
|
||||
@@ -56,7 +65,7 @@ export const registerDevCommands = (program: Command): void => {
|
||||
'--dry-run',
|
||||
'Preview the metadata changes without applying them (requires --once)',
|
||||
)
|
||||
.option('--debounceMs <ms>', 'Debounce in ms (default: 2 000)')
|
||||
.option('--debounceMs <ms>', 'Debounce in ms (default: 1 000)')
|
||||
.option('-v, --verbose', 'Show detailed logs')
|
||||
.option('-d, --debug', 'Show detailed logs (alias for --verbose)')
|
||||
.action(devAction);
|
||||
|
||||
Reference in New Issue
Block a user