Refactor filename naming system and apply convention-based renames

Standardize settings file naming and relocate documentation files
Fix code quality violations from rsx:check
Reorganize user_management directory into logical subdirectories
Move Quill Bundle to core and align with Tom Select pattern
Simplify Site Settings page to focus on core site information
Complete Phase 5: Multi-tenant authentication with login flow and site selection
Add route query parameter rule and synchronize filename validation logic
Fix critical bug in UpdateNpmCommand causing missing JavaScript stubs
Implement filename convention rule and resolve VS Code auto-rename conflict
Implement js-sanitizer RPC server to eliminate 900+ Node.js process spawns
Implement RPC server architecture for JavaScript parsing
WIP: Add RPC server infrastructure for JS parsing (partial implementation)
Update jqhtml terminology from destroy to stop, fix datagrid DOM preservation
Add JQHTML-CLASS-01 rule and fix redundant class names
Improve code quality rules and resolve violations
Remove legacy fatal error format in favor of unified 'fatal' error type
Filter internal keys from window.rsxapp output
Update button styling and comprehensive form/modal documentation
Add conditional fly-in animation for modals
Fix non-deterministic bundle compilation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-13 19:10:02 +00:00
parent fc494c1e08
commit 77b4d10af8
28155 changed files with 2191860 additions and 12967 deletions

View File

@@ -137,17 +137,15 @@ class Document_Models_Command extends FrameworkDeveloperCommand
// Build property annotations
$properties = [];
$dateColumns = [];
foreach ($columns as $column) {
try {
$type = DB::getSchemaBuilder()->getColumnType($tableName, $column);
$phpType = $this->mapDatabaseTypeToPhp($type);
// Track datetime columns for $dates array
if (in_array($type, ['datetime', 'timestamp', 'date', 'time'])) {
$dateColumns[] = $column;
}
// Note: Type casting (boolean, datetime, date, time) is handled automatically
// by getCasts() in Rsx_Model_Abstract via manifest metadata.
// No need to generate $casts arrays in model files.
$properties[] = " * @property $phpType \$$column";
} catch (\Exception $e) {
@@ -212,19 +210,6 @@ class Document_Models_Command extends FrameworkDeveloperCommand
$docBlock .= " * @mixin \\Eloquent\n";
$docBlock .= " */";
// Build dates array if needed
$datesArray = '';
if (!empty($dateColumns)) {
$datesArray = "\n /**\n";
$datesArray .= " * _AUTO_GENERATED_ Date columns for Carbon casting\n";
$datesArray .= " */\n";
$datesArray .= " protected \$dates = [\n";
foreach ($dateColumns as $column) {
$datesArray .= " '$column',\n";
}
$datesArray .= " ];\n";
}
// Build enum constants block if needed
$constantsBlock = '';
if (!empty($enumConstants)) {
@@ -235,10 +220,10 @@ class Document_Models_Command extends FrameworkDeveloperCommand
}
// Now modify the file
$this->updateModelFile($filePath, $className, $docBlock, $datesArray, $constantsBlock);
$this->updateModelFile($filePath, $className, $docBlock, $constantsBlock);
}
protected function updateModelFile($filePath, $className, $docBlock, $datesArray, $constantsBlock)
protected function updateModelFile($filePath, $className, $docBlock, $constantsBlock)
{
$content = file_get_contents($filePath);
@@ -246,10 +231,6 @@ class Document_Models_Command extends FrameworkDeveloperCommand
$this->info(" [DRY-RUN] Would update $filePath");
$this->line(" DocBlock to add:");
$this->line($docBlock);
if ($datesArray) {
$this->line(" Dates array to add:");
$this->line($datesArray);
}
if ($constantsBlock) {
$this->line(" Constants to add:");
$this->line($constantsBlock);
@@ -264,13 +245,20 @@ class Document_Models_Command extends FrameworkDeveloperCommand
$content
);
// Remove existing auto-generated dates array
// Remove existing auto-generated dates array (deprecated)
$content = preg_replace(
'/\s*\/\*\*\s*\n\s*\*\s*_AUTO_GENERATED_\s*Date columns.*?\];/s',
'',
$content
);
// Remove existing auto-generated casts array (no longer generated)
$content = preg_replace(
'/\s*\/\*\*\s*\n\s*\*\s*_AUTO_GENERATED_\s*Type casts.*?\];/s',
'',
$content
);
// Remove existing auto-generated constants
$content = preg_replace(
'/\s*\/\*\*\s*\n\s*\*\s*_AUTO_GENERATED_\s*Enum constants.*?\n(?:\s*const\s+\w+\s*=\s*[^;]+;\n)+/s',
@@ -278,6 +266,24 @@ class Document_Models_Command extends FrameworkDeveloperCommand
$content
);
// Remove duplicate constant declarations that match what we're about to generate
// This cleans up any manual or leftover constants that duplicate the auto-generated ones
if ($constantsBlock) {
// Extract each constant line from the block we're about to add
preg_match_all('/const\s+\w+\s*=\s*[^;]+;/', $constantsBlock, $matches);
foreach ($matches[0] as $constantLine) {
$trimmedConstant = trim($constantLine);
// Remove any lines in the file that match this exact constant declaration
$content = preg_replace(
'/^\s*' . preg_quote($trimmedConstant, '/') . '\s*$/m',
'',
$content
);
}
// Clean up any resulting multiple blank lines
$content = preg_replace('/\n{3,}/', "\n\n", $content);
}
// Find the class declaration
$classPattern = '/(^|\n)((?:abstract\s+)?class\s+' . preg_quote(class_basename($className), '/') . '\s+extends\s+[^\{]+)\s*\{/';
@@ -301,11 +307,6 @@ class Document_Models_Command extends FrameworkDeveloperCommand
$newContent .= $constantsBlock;
}
// Add dates array after constants (or after opening brace)
if ($datesArray) {
$newContent .= $datesArray;
}
// Add the rest of the file
$newContent .= substr($afterClassDeclaration, 1); // Skip the opening brace we already added