Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
commonApiPost,
commonApiPostForm,
} from "@/services/api/common-api";
import { getUploadErrorMessage } from "@/services/api/upload-error";
import { useMutation, useQuery } from "@tanstack/react-query";
import type { FormEvent} from "react";
import { useContext, useEffect, useRef, useState } from "react";
Expand Down Expand Up @@ -145,7 +146,7 @@ export default function UserPageHeaderEditPfp({
},
onError: (error: unknown) => {
setToast({
message: error as string,
message: getUploadErrorMessage(error),
type: "error",
});
},
Expand Down
21 changes: 0 additions & 21 deletions config/nextConfig.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { createSecurityHeaders } from "./securityHeaders";
import { PublicEnv } from "./env.schema";
import { NextConfig } from "next";
import path from "node:path";

export function sharedConfig(
publicEnv: PublicEnv,
Expand All @@ -14,10 +13,6 @@ export function sharedConfig(
compress: true,
productionBrowserSourceMaps: true,
sassOptions: { quietDeps: true },
experimental: {
webpackMemoryOptimizations: true,
webpackBuildWorker: true,
},
images: {
loader: "default",
remotePatterns: [
Expand Down Expand Up @@ -48,22 +43,6 @@ export function sharedConfig(
},
];
},
webpack: (
config: any,
{ dev, isServer }: { dev: boolean; isServer: boolean }
) => {
config.resolve.alias.canvas = false;
config.resolve.alias.encoding = false;
config.resolve.alias["@react-native-async-storage/async-storage"] = false;
config.resolve.alias["react-native"] = false;
config.resolve.alias["idb-keyval"] = path.resolve(
process.cwd(),
"lib/storage/idb-keyval.ts"
);
if (!dev && !isServer) config.devtool = "source-map";
config.optimization.minimize = false;
return config;
},
turbopack: {
resolveAlias: {
canvas: "./stubs/empty.js",
Expand Down
85 changes: 43 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,17 @@
"jwt-decode": "^4.0.0",
"lexical": "^0.14.5",
"lodash": "^4.17.21",
"next": "16.0.10",
"next": "16.1",
Comment thread
simo6529 marked this conversation as resolved.
"next-redux-wrapper": "^8.1.0",
"next-sitemap": "^4.2.3",
"open": "^10.2.0",
"p-limit": "^3.1.0",
"p-retry": "^6.2.1",
"qrcode": "^1.5.4",
"react": "19.2.3",
"react": "^19.2.3",
"react-bootstrap": "^2.10.3",
"react-chartjs-2": "^5.2.0",
"react-dom": "19.2.3",
"react-dom": "^19.2.3",
"react-error-boundary": "^6.0.0",
"react-markdown": "^9.0.1",
"react-redux": "^9.1.2",
Expand Down
7 changes: 4 additions & 3 deletions scripts/worktree/sync.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
# notes.txt

.coderabbit.yml
.claude
.claude/
CLAUDE.md
.codex
.codex/
AGENTS.md
.gemini
.gemini/
.agent/
109 changes: 12 additions & 97 deletions scripts/worktree/wt-add.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
MAIN_REPO="$(cd "$SCRIPT_DIR/../.." && pwd)"
PARENT_DIR="$(dirname "$MAIN_REPO")"
COMMON_SH="$SCRIPT_DIR/wt-common.sh"

if [[ ! -f "$COMMON_SH" ]]; then
echo "Missing helper script: $COMMON_SH"
exit 1
fi
# shellcheck source=./wt-common.sh
source "$COMMON_SH"

# Usage: ./scripts/worktree/wt-add.sh <worktree-name> [base-ref] [branch-name]
if [ $# -lt 1 ]; then
Expand All @@ -30,106 +38,13 @@ echo "✓ Branch '$TARGET_BRANCH' ready in worktree '$WORKTREE_NAME'."
echo "Syncing files..."
"$SCRIPT_DIR/wt-sync.sh" "$WORKTREE_NAME"

# 3. Set VS Code color randomly
VSCODE_PATH="$WORKTREE_PATH/.vscode"
mkdir -p "$VSCODE_PATH"

COLORS=("red" "orange" "yellow" "green" "blue" "purple" "pink" "teal")
RAND_COLOR=${COLORS[$RANDOM % ${#COLORS[@]}]}

cat > "$VSCODE_PATH/settings.json" <<EOF
{
"workbench.colorCustomizations": {
"titleBar.activeBackground": "$RAND_COLOR",
"titleBar.inactiveBackground": "$RAND_COLOR"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},

// --- Fixes on save ---
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.fixAll.eslint": "explicit"
},

// --- Search / Explorer excludes ---
"files.exclude": {
"**/.DS_Store": true
},
"search.exclude": {
"**/dist": true,
"**/build": true,
"**/coverage": true,
"**/.next": true,
"**/generated": true
},

// --- File watcher excludes ---
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/dist/**": true,
"**/.next/**": true,
"**/coverage": true,
"**/generated": true
},

// --- Whitespace + EOL ---
"files.eol": "\n",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"[markdown]": { "files.trimTrailingWhitespace": false },

// --- TypeScript ---
"typescript.preferences.importModuleSpecifier": "non-relative",

// --- Tailwind IntelliSense (if using the extension) ---
"tailwindCSS.experimental.classRegex": [
"['\"`]([^'\"`]*tw-[^'\"`]*)['\"`]",
["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"],
["cn\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"],
["cva\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
]
}
EOF
echo "VS Code color set to $RAND_COLOR."
# 3. Set VS Code settings (keep existing color if present)
COLOR=$(setup_vscode_settings "$WORKTREE_PATH")
echo "VS Code color set to $COLOR."

# 4. Set up pre-commit hook
echo "Setting up pre-commit hook..."
mkdir -p "$WORKTREE_PATH/.hooks"
cat > "$WORKTREE_PATH/.hooks/pre-commit" <<'HOOK'
#!/bin/sh
if [ "$SKIP_LINT" = "1" ]; then
echo "Skipping lint (SKIP_LINT=1)"
exit 0
fi
npm run format:uncommitted
git add -u
npm run lint:uncommitted:tight
HOOK
chmod +x "$WORKTREE_PATH/.hooks/pre-commit"
git -C "$WORKTREE_PATH" config extensions.worktreeConfig true
git -C "$WORKTREE_PATH" config --worktree core.hooksPath .hooks
setup_precommit_hook "$WORKTREE_PATH"
echo "Pre-commit hook configured."

# 5. Run npm install
Expand Down
Loading