-
Notifications
You must be signed in to change notification settings - Fork 14
refactor: remove dead code and fix latent bugs found in a full codebase review #640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ca3bf6c
ea32d92
22b38a6
b9a5348
866c1dc
da4c38c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ Modules/Core/Providers/ # All three Filament panel providers live here | |
| | Module | Key models | | ||
| |--------|-----------| | ||
| | Core | User, Company, CompanyUser, TaxRate, Numbering, EmailTemplate, CustomField, Upload, Note, AuditLog, Setting, MailQueue | | ||
| | Clients | Relation (table: `relations`), Contact, Address, Communication, ClientCustom (`PK: client_custom_id`) | | ||
| | Clients | Relation (table: `relations`), Contact, Address, Communication | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n== CLAUDE.md ==\n'
nl -ba CLAUDE.md | sed -n '1,80p'
printf '\n== AGENTS.md ==\n'
nl -ba AGENTS.md | sed -n '120,150p'
printf '\n== .claude/skills/non-standard-pks/SKILL.md ==\n'
nl -ba .claude/skills/non-standard-pks/SKILL.md | sed -n '1,120p'Repository: InvoicePlane/InvoicePlane-v2 Length of output: 223 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n== CLAUDE.md ==\n'
sed -n '1,80p' CLAUDE.md | cat -n
printf '\n== AGENTS.md ==\n'
sed -n '120,150p' AGENTS.md | cat -n
printf '\n== .claude/skills/non-standard-pks/SKILL.md ==\n'
sed -n '1,120p' .claude/skills/non-standard-pks/SKILL.md | cat -n
printf '\n== exact string search ==\n'
rg -n "ClientCustom::\\$primaryKey = 'client_custom_id'|Import::\\$primaryKey = 'import_id'|non-standard-pks|primaryKey" .Repository: InvoicePlane/InvoicePlane-v2 Length of output: 7990 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n== CLAUDE.md around line 248 ==\n'
sed -n '236,256p' CLAUDE.md | cat -n
printf '\n== literal PK search ==\n'
rg -n -F "ClientCustom::$primaryKey = 'client_custom_id'" AGENTS.md .claude/skills/non-standard-pks/SKILL.md CLAUDE.md || true
rg -n -F "Import::$primaryKey = 'import_id'" AGENTS.md .claude/skills/non-standard-pks/SKILL.md CLAUDE.md || trueRepository: InvoicePlane/InvoicePlane-v2 Length of output: 1028 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n== model definitions ==\n'
rg -n -F "class ClientCustom" Modules app database . || true
rg -n -F "class Import" Modules app database . || true
printf '\n== primary key declarations ==\n'
rg -n 'protected\s+\$primaryKey\s*=\s*'\''client_custom_id'\''' Modules app database . || true
rg -n 'protected\s+\$primaryKey\s*=\s*'\''import_id'\''' Modules app database . || trueRepository: InvoicePlane/InvoicePlane-v2 Length of output: 223 Keep the non-standard PK docs in sync. 🤖 Prompt for AI Agents |
||
| | Invoices | Invoice, InvoiceItem, RecurringInvoice | | ||
| | Quotes | Quote, QuoteItem | | ||
| | Payments | Payment | | ||
|
|
@@ -245,8 +245,6 @@ Invoice::observe(InvoiceObserver::class); | |
|
|
||
| - `Company::$primaryKey` = `id` (standard); URL slug is `search_code` (10 chars, unique, e.g. `ivplv2`) | ||
| - `User::$timestamps = false` — no created_at/updated_at on users table | ||
| - `ClientCustom::$primaryKey = 'client_custom_id'` — non-standard PK | ||
| - `Import::$primaryKey = 'import_id'` — non-standard PK | ||
| - `Relation` model → table `relations` (not `customers`, not `clients`) | ||
| - Soft deletes on: Invoice, Quote (and their items) | ||
| - `BelongsToCompany` trait → adds `company()` BelongsTo, `scopeForCompany()`, and global scope | ||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: InvoicePlane/InvoicePlane-v2
Length of output: 231
🏁 Script executed:
Repository: InvoicePlane/InvoicePlane-v2
Length of output: 613
🏁 Script executed:
Repository: InvoicePlane/InvoicePlane-v2
Length of output: 286
🌐 Web query:
gitignore double quotes literal characters pattern spaces quoted filenames documentation💡 Result:
In gitignore files, double quotes do not have special meaning and are treated as literal characters [1]. Git patterns do not support enclosing filenames in double quotes to handle spaces or special characters [1]. To include spaces or special characters in a gitignore pattern, use a backslash () to escape them [2][3][4]. Specific rules regarding characters and spaces: 1. Spaces: Trailing spaces in a pattern are ignored unless they are escaped with a backslash [2][4]. To match a file or directory with a space, such as "my folder", you should write the pattern as "my\ folder" [1]. 2. Escaping: A backslash () can be used to escape any character to treat it as a literal [2][3]. For example, if you need to match a literal asterisk or exclamation mark, use * or ! [2][4]. 3. Double Quotes: If you place double quotes around a pattern, such as "file name", Git will look for a file that literally contains those double quotes in its name, rather than interpreting them as shell-style quotes for the filename [1].
Citations:
Remove the quotes from this ignore pattern.
.gitignoretreats double quotes as literal characters, so this only matches a filename that actually contains quotes. Usesaving\ some\ issues.mdinstead.🤖 Prompt for AI Agents