Commit Graph
16 Commits
Author SHA1 Message Date
Jonathan Kirkwood e7501a14b0 0.2.23: link GP entities to their investor account for auto asset balances
Ten31 LLC (and any GP/mgmt entity) can be linked to its investor account,
so its Assets tab shows its real capital-account balance in each fund,
pulled live from the eNAV capital accounts instead of manual entry.

- entities.linked_user_id (migration c9d0e1f2a3b4) + EntityCreate/Update/
  Response fields; validated to be an investor account.
- Edit-entity form gains a "Linked investor account" picker for GP/mgmt.
- Assets tab now auto-lists the linked account's balance per fund (the
  earlier manual-stakes API remains but is no longer used by the UI).

Verified: 13/13 backend tests pass; alembic head c9d0e1f2a3b4; frontend
tsc + vite build clean.
2026-07-01 15:21:28 -05:00
Jonathan Kirkwood f0f8fd15c6 Release 0.2.22: capital chart, Investor View, GP stakes, doc folders
Snapshot commit bringing the uncommitted phase-2 work into version control
together with four new features and the 0.2.22 version bump.

New features:
- Investor capital-over-time chart (value, paid-in, distributions per
  quarter), rendered from existing capital-account history.
- Admin Investor View: read-only reconstruction of an investor's portal
  (GET /api/users/{id}/investor-view), reusing the investor portal UI.
- Document upload scoped to the selected fund's own investors, with an
  explicit upload-target confirmation to prevent mis-attaching.
- GP/mgmt entities gain an Assets tab listing their stakes in the funds
  they manage (new entity_stakes table + /api/entities/{id}/stakes).
- Edit-entity form (change type/status/etc.), so GP entities can be
  categorized correctly.

Verified: 11/11 backend tests pass; alembic upgrades to head b8c9d0e1f2a3;
frontend tsc + vite build clean; s9pk packs at 0.2.22:0 (x86_64).
Also: ignore .DS_Store and *.s9pk artifacts.
2026-07-01 14:25:50 -05:00
Jonathan Kirkwood 7fc78d7058 Release 0.2.21; track the StartOS version files
Cut version 0.2.21 (current = v_0_2_21) with the adjudicated DO-item fixes.
Also commits the previously-untracked v_0_2_* version files that
versions/index.ts imports (ROADMAP item D2), so a fresh checkout builds
without dangling imports. The missing v_0_2_2 is intentional (versions are
an unordered set).

Built and verified: ten31portal_x86_64.s9pk packs cleanly at 0.2.21:0,
arch x86_64, SDK 0.4.0.
2026-07-01 13:39:56 -05:00
Jonathan Kirkwood 8247c28243 Implement adjudicated DO items across backend, frontend, deploy
From the ROADMAP adjudication (12 of 13 DO items; D2 is a commit action).

Backend:
- B3: pytest suite (auth, entity CRUD, rollup) + dev deps + pytest config
- B4: cap document uploads at TEN31_MAX_UPLOAD_SIZE (default 50MB), stream-
  checked with partial-file cleanup, 413 on overflow
- B7: type AuditLog.detail as dict|list|str|None to match the JSON column
- B10: index foreign-key columns (migration a7b8c9d0e1f2 + index=True)
- B11: cli delete-user logs file-removal errors instead of swallowing them

Frontend:
- F2: distinguish "server unreachable" from "logged out"; retry prompt
- F4: confirm before destructive holdings-replace on import; step progress
- F6: expandable audit-log detail with full JSON
- F7: empty-state on the Investments page
- F8: shared role helpers (WRITER_ROLES/canEditRound/isApprover), used by
  EntitiesList, AuditLog, Import, ValuationWorkflow

Deploy:
- D5: run tsc --noEmit before packaging (build script)
- D6: TEN31_LOG_LEVEL env var (defaults to info)

Verified: 8/8 backend tests pass; alembic upgrades to head with 13 FK
indexes; upload limit rejects oversized + cleans up; frontend tsc + vite
build clean; dev server serves and proxies to the API.
2026-07-01 13:33:40 -05:00
Jonathan Kirkwood 77eeb3bd7f Add adjudicated ROADMAP: 13 drop, 13 do, 4 escalate
Grounded survey of the tree (backend/frontend/deploy), then
adjudicated each P2/P3 item investigate -> debate -> judge.

Dropped as not-worth-it (removed): B2 rollup N+1 (fine at scale),
F1 money formatters (2 trivial lines), F3 SW cache (stale-shell
can't happen), D1 health check (no real race), D3 aarch64 (x86
internal tool), D4 pin SDK (lockfile already deterministic),
B5 string caps (SQLite ignores), B6 created_at (already present),
B8 VelvetSweatshop (harmless), B9 empty-strip (already handled),
F9 loading text / F10 spinner / F11 confirm() (cosmetic).

Kept as DO with plans: B3 tests, B4 upload cap, B7 audit type,
B10 FK indexes, B11 cli errors, F2 auth-vs-network, F4 import
confirm, F6 audit detail, F7 empty-state, F8 role helpers,
D2 commit version files, D5 type-check, D6 log-level env.

Escalated (your call): B1 pagination (epic, perm-filtered lists),
F5 valuation negatives (money write path), D7 default admin creds
(auth, onboarding externals), D8 uninstall wording (corrected
fact; ties to H1 backup question).
2026-07-01 09:21:59 -05:00
Johnny 5 758fac3ab5 fix: handle duplicate security names and non-JSON error responses
Build Service / build (push) Canceled after 0s
- Disambiguate duplicate (company, security) pairs in Carta exports:
  e.g. two 'Warrants' under BIP21 become 'Warrants' and 'Warrants (2)'
- Tested against Fund II: 33 holdings, 41 positions (3 companies with
  duplicate tranches), zero errors
- Frontend: graceful handling of 500 responses (shows status code
  instead of JSON parse crash)
2026-06-08 03:20:37 +00:00
Johnny 5 30d2284feb Issues 19+20: entity-aware schedule import and rollup endpoint
Issue 19:
- entity_id now optional on POST /api/import/schedule
- Resolution: explicit entity_id > name match from row 1 > auto-create
- New params: create_entity_type (default fund), create_vintage_year
- Dry-run reports resolution (will_create/matched/existing)
- Frontend: radio toggle between 'Create from file' and 'Use existing'

Issue 20:
- GET /api/entities/rollup: invested_cents and last_signed_value_cents
  per entity in one pass (SQL aggregates, no waterfall)
- EntitiesList uses rollup instead of N+1 API calls
2026-06-08 03:02:59 +00:00
Johnny 5 7c33693eab Issue 18: Add Entity form on the entities list
- Add Entity button visible only for writer roles
- Inline form: name, type (Fund/SPV/GP/Mgmt Co), vintage year, fund size
- Fund size entered as dollars, stored as cents
- API errors surfaced inline
- Refreshes list on success
2026-06-08 02:59:31 +00:00
Johnny 5 ba9f026545 Wire Import and Audit Log pages, add Create User action
- Import page: schedule (XLSX/CSV) and entity import with dry-run toggle
- Audit Log page: paginated, filterable by object type
- Nav items now clickable (removed stubs)
- StartOS Action: Create User with name/email/password/role inputs
- Default first-boot creds: jonathan@ten31.xyz
2026-06-07 22:26:14 +00:00
Johnny 5 fce02fe696 fix: default first-boot credentials to jonathan@ten31.xyz 2026-06-07 22:20:35 +00:00
Johnny 5 8c1e98ff8b fix: add --no-assets to s9pk pack (no assets dir) 2026-06-07 22:11:24 +00:00
Johnny 5 84ecbbffa3 CI: GitHub Actions build and release workflows
- build.yml: runs on push to main, builds Docker image + packs s9pk,
  uploads artifact
- release.yml: runs on version tags (v*.*), builds and creates GitHub
  release with s9pk attached
- Dockerfile: build context is repo root (docker build -f deploy/Dockerfile .)
- Manifest: switched to dockerTag (pre-built image pattern)
- Makefile + s9pk.mk: local build support
2026-06-07 22:09:05 +00:00
Johnny 5 48fef14bc9 Issue 10: confirm schedule importer against real Carta XLSX
- Parse Carta XLSX natively (openpyxl) instead of CSV-only
- Column map confirmed against Fund I export: Investment/Asset/
  Investment date/Shares/Cost/Value/Last Valuation date
- Handle grouped layout: company subtotal rows + indented position rows
- SAFEs: shares=0 in source → null in DB (not additive)
- Money already in dollars in XLSX cells, convert to cents directly
- Dates parsed from Excel datetime objects
- CSV fallback preserved for other formats
- Re-import guard catches both seed and non-seed existing rounds
- Tested: 14 holdings, 17 positions, total value $8,527,204.58 matches
2026-06-07 19:30:12 +00:00
Johnny 5 89eddd2ad0 Issue 17: StartOS 0.4.0 packaging
- Dockerfile: multi-stage build (Node frontend + Python backend)
- StartOS manifest, interfaces, backups, version graph
- start.sh: auto-generates session secret, creates first approver on boot
- Backend serves built frontend as SPA in production
- Single data volume for SQLite DB, platform backups cover it
2026-06-07 19:23:26 +00:00
Johnny 5 a70bdeaa5e Issue 1: repo scaffold and project structure 2026-06-07 19:20:02 +00:00
smallblocksandGitHub e0b31009b7 Initial commit 2026-06-07 13:52:16 -05:00