Mike-to-PIP rename: identifiers, localStorage keys, DnD MIME types, admin branding

Four commits sweeping "Mike" out of cpatpa's codebase - browser-visible strings first, then internal TypeScript identifiers, then package names and localStorage keys - plus an admin-managed branding system for firm colour tokens and logo variants.

brandingmulti-tenant

Browser-visible pass (74e803c2, +25/-24 across 10 files). Page title, OG metadata, Twitter card, global error page, support form copy, models page description, workflow "system" badge, column-prompt placeholders, site logo wordmark. metadataBase and the landing href on the site logo now read NEXT_PUBLIC_API_BASE_URL instead of the hardcoded mikeoss.com. Internal type names and the MikeIcon component are intentionally left for the follow-up.

Identifier rename (7d24a909, +359/-364 across 70 files). MikeProject, MikeChat, MikeDocument, MikeFolder, MikeMessage, MikeWorkflow, MikeIcon, MikeLayoutPip*. mikeApi.tspipApi.ts; mike-icon.tsxpip-icon.tsx. Drag-and-drop MIME-like strings application/mike-doc and application/mike-folderpip-*. DOM custom event mike:close-row-actionspip:close-row-actions. The backend system prompt in chatTools.ts is rewritten: "You are Mike, an AI legal assistant..." becomes a PIP-branded, AU-English-tuned prompt specifying AGLC4 citation, metric units, DD/MM/YYYY dates, a hallucination guard, and a not-legal-advice reminder. Tracked-change author and change-id prefix flip from "Mike" to "PIP".

Residuals (a6b6c0f3, +16/-9 across 7 files). package.json and lockfile name fields (mikepip, mike-backendpip-backend). localStorage key migration: the hook now reads from pip.selectedModel, falls back once to mike.selectedModel (migrating the value and removing the old key), then returns null - a clean one-time migration without breaking existing sessions. mikeoss.com placeholder URL in the support page → example.com.

Admin branding (8276afb9, migration 0021, +1107/-46 across 17 files). Adds brand_primary_hex, brand_secondary_hex, and brand_neutral_hex columns to org_settings (defaulting to Piper Alderman's brand guide values: #A93226, #36475C, #6E6E6E). Five logo variant columns: logo_full_colour_path, logo_full_white_path, logo_mark_path, logo_dark_mono_path, logo_favicon_path. Logo files are stored as plain files under ${DATA_ROOT}/branding - not through the AES-encrypted document storage driver, since logos are marketing material rather than client documents. Filenames are content-hashed so uploading a replacement invalidates browser caches automatically. Accepted MIME types: PNG, SVG, WebP, JPEG for general variants; PNG, SVG, ICO for the favicon.

So what The rename itself is only relevant if you're doing your own brand sweep. The worked example is useful as a checklist of where product names hide: DnD MIME strings, DOM event names, localStorage keys, tracked-change author fields, system prompts, and package.json `name` - all surface alongside the obvious type renames. The localStorage one-time migration trick (read old key, write new key, remove old key, done) is worth copying. The admin branding system is the more interesting port candidate: server-side colour tokens and content-hashed logo files give operators firm customisation without a code deploy.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

4 commits from cpatpa/PIP, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
74e803c2 Browser-visible branding pass: Mike -> PIP Claude 2026-05-15 ↗ GitHub
commit body
Page title, OG metadata, twitter card, error-page title, support
form copy, models page copy, workflows "system" badge, tabular and
workflow column-prompt placeholders, project people modal docblock,
and the site logo wordmark all swap "Mike" for "PIP".

metadataBase and the site-logo landing href now read
NEXT_PUBLIC_API_BASE_URL instead of hard-coding the upstream
mikeoss.com domain.

Internal type names (MikeProject, MikeChat, etc.), the
mikeApi.ts module and the MikeIcon component intentionally stay -
those are part of a follow-up rename so the diffs stay reviewable.
7d24a909 Rename Mike* identifiers to Pip* Claude 2026-05-15 ↗ GitHub
commit body
Bulk rename of upstream-shaped identifiers so the codebase reads as
PIP end-to-end:

  MikeProject, MikeChat, MikeChatDetailOut, MikeCitationAnnotation,
  MikeDocument, MikeDocumentVersion, MikeEditAnnotation, MikeFolder,
  MikeMessage, MikeWorkflow, MikeIcon, MikeLayout -> Pip*
  mikeApi.ts -> pipApi.ts, mike-icon.tsx -> pip-icon.tsx
  application/mike-doc, application/mike-folder DnD MIME-likes -> pip-*
  mike:close-row-actions event -> pip:close-row-actions

Removes the long-dead `mike` boolean prop on PipIcon and its three
callsites.

Backend defaults: chatTools system prompt is now PIP-branded and AU
English-tuned (AGLC4 citations, metric, DD/MM/YYYY, no fabrication,
not-legal-advice reminder). Org admins can still override via
/admin/org-settings. Tracked-change author and change-id prefix flip
from "Mike" to "PIP" so docx revisions surface the right name.
a6b6c0f3 Clean up residual "Mike" references missed by Phase 11 Claude 2026-05-16 ↗ GitHub
commit body
- Rename package.json + lockfile names (mike -> pip, mike-backend
  -> pip-backend) in both apps.
- Update shared/types.ts header comment.
- Migrate localStorage key mike.selectedModel -> pip.selectedModel
  with a one-time legacy read so existing users keep their model
  selection.
- Replace mikeoss.com placeholder URL on the support page with a
  neutral example.com value.
8276afb9 Admin branding: colour tokens, five logo variants, runtime favicon Claude 2026-05-16 ↗ GitHub
commit body
Adds an admin-managed branding surface so the firm's brand colours
and logos can be set from the UI without touching code.

Schema (migration 0021):
- org_settings.brand_primary_hex   default #A93226 (brand red)
- org_settings.brand_secondary_hex default #36475C (dark navy)
- org_settings.brand_neutral_hex   default #6E6E6E (nav text grey)
- org_settings.logo_*_path columns for five variants:
  full_colour, full_white, mark, dark_mono, favicon

Logos live as plain files under ${DATA_ROOT}/branding (mounted to
/data/branding in the backend container). Filenames are
content-hashed so cache busting is automatic. PNG, SVG, WebP, JPEG
accepted for normal variants; .ico, PNG, or SVG for the favicon.
2 MB cap.

Backend:
- New lib/branding.ts (load, write, read, delete, mime/hex
  validation).
- New /branding (public) endpoint pair: GET /branding returns the
  colour tokens + logo URLs; GET /branding/logo/:filename streams
  bytes. No auth required since logos are non-sensitive and the
  login splash needs them.
- New /admin/branding endpoints: GET, PATCH (colours),
  POST /admin/branding/logo/:variant (multipart upload),
  DELETE /admin/branding/logo/:variant.
- singleFileUpload helper now takes a maxBytes argument so the
  branding route can cap at 2 MB without affecting document upload
  limits.

Frontend:
- New BrandingProvider context loads /branding once on app boot,
  injects CSS variables (--pip-primary, --pip-secondary,
  --pip-neutral), and swaps <link rel="icon"> when a favicon
  variant is uploaded.
- SiteLogo prefers the uploaded full_colour variant, falls back to
  the built-in PipIcon + wordmark.
- AppSidebar header shows the mark variant when uploaded; otherwise
  the wordmark renders in the brand-red colour.
- New /admin/branding page: hex colour pickers, drag/upload zones
  per logo variant with preview and remove buttons.

Infra:
- docker-compose mounts ${DATA_ROOT}/branding to /data/branding,
  sets BRANDING_LOCAL_PATH.
- install.sh provisions the branding dir at uid 10001.
- Caddy template adds /branding /branding/* to @backend_api.

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-366.md from inside the repo you want the changes in.

⬇ Download capture-thread-366.md