[BUG] Claude Code is Shit
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude Code is proper shit, it's the first time trying and this shit tool burned all the tokens just to try to create a delete function, the Gemini 3.1 e 100X better. People talk about this, but is all hype. Even Qwen is better for coding
What Should Happen?
the behavior? your AI are not able to create a delete function that i create manually in 10 minutes, because some documents need to be archived and other not, the system was not able to do that. i bought your subscription, i canceller in the same day. proper shit for coding
Error Messages/Logs
Steps to Reproduce
export async function updateProperty(id: string, data: any) {
try {
const { documents, id: _, displayId: __, idSerial: ___, ...propertyData } = data;
const [property] = await db
.update(properties)
.set({
...propertyData,
updatedAt: new Date(),
})
.where(eq(properties.id, id))
.returning();
// Handle documents (Archive instead of Delete, Latest Date Wins)
if (documents && Array.isArray(documents)) {
// 1. Process incoming documents to sync with DB
for (const doc of documents) {
if (!doc.url || doc.url.trim() === "") continue;
if (doc.id) {
await db.update(documentsTable)
.set({
name: doc.name,
url: doc.url,
type: doc.type || "OTHER",
category: doc.name,
expiryDate: doc.expiryDate ? new Date(doc.expiryDate) : null,
uploadDate: doc.uploadDate ? new Date(doc.uploadDate) : new Date(),
// We don't force ACTIVE yet, we re-evaluate below
})
.where(eq(documentsTable.id, doc.id));
} else {
await db.insert(documentsTable).values({
name: doc.name,
url: doc.url,
type: doc.type || "OTHER",
category: doc.name,
status: "ACTIVE", // Start as active, re-evaluation will fix if old
expiryDate: doc.expiryDate ? new Date(doc.expiryDate) : null,
uploadDate: new Date(),
propertyId: id,
});
}
}
// 2. Archive documents missing from the form (but not ones with valid future expiry)
const existingDocsInDB = await db.query.documents.findMany({
where: eq(documentsTable.propertyId, id)
});
const incomingIds = documents.filter((d: any) => d.id).map((d: any) => d.id);
const now = new Date();
for (const ed of existingDocsInDB) {
if (!incomingIds.includes(ed.id) && ed.status === 'ACTIVE') {
// Don't archive if document has a valid future expiry date
const hasValidExpiry = ed.expiryDate && new Date(ed.expiryDate).getTime() > now.getTime();
if (!hasValidExpiry) {
await db.update(documentsTable).set({ status: 'ARCHIVED' }).where(eq(documentsTable.id, ed.id));
}
}
}
// 3. Sync key dates to property record (Latest Date Wins)
const stdTypes = ["CP12", "EICR", "EPC"];
for (const type of stdTypes) {
const [latest] = await db.select().from(documentsTable).where(and(
eq(documentsTable.propertyId, id),
or(
ilike(documentsTable.name, type),
ilike(documentsTable.category, type),
...(type === "CP12" ? [ilike(documentsTable.name, "%Gas%")] : []),
...(type === "EICR" ? [ilike(documentsTable.name, "%Electric%")] : [])
)
)).orderBy(sql${documentsTable.expiryDate} DESC NULLS LAST, desc(documentsTable.uploadDate)).limit(1);
if (latest) {
const syncData: any = {};
if (type === "CP12") syncData.gasExpiryDate = latest.expiryDate;
if (type === "EICR") syncData.eicrExpiryDate = latest.expiryDate;
if (type === "EPC") syncData.epcExpiryDate = latest.expiryDate;
if (Object.keys(syncData).length > 0) {
await db.update(properties).set(syncData).where(eq(properties.id, id));
}
}
}
}
await logActivity("UPDATE", "PROPERTY", id, { changes: Object.keys(propertyData) });
revalidatePath("/dashboard/properties");
revalidatePath("/dashboard/compliance");
revalidatePath(/dashboard/properties/${id});
revalidatePath("/dashboard");
return property;
} catch (error) {
console.error(Failed to update property ${id}:, error);
throw error;
}
}
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
sonnet 4.6
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗