Skip to content

Implement logbook sharing#178

Open
ultimate wants to merge 8 commits into
mainfrom
codex/implement-public-logbook-sharing
Open

Implement logbook sharing#178
ultimate wants to merge 8 commits into
mainfrom
codex/implement-public-logbook-sharing

Conversation

@ultimate

Copy link
Copy Markdown
Owner

Motivation

  • Allow users to share individual logbook sheets by URL with configurable privacy levels (private / registered / public) and fine-grained controls for which sections are visible (master data, picture, loglines, technical log, skipper, crew).

Description

  • Add types and defaults for sharing settings in app/models/log-sheet.ts and extend stored row types in app/models/logbook-rows.ts.
  • Persist sharing columns via migration app/lib/db/migrations/020_log_sheet_sharing.sql and update app/lib/db/schema.sql; wire the new columns into the LogSheetsRepository insert and mapping logic (including boolean helpers boolValue/boolFromRow).
  • Implement shared-sheet lookup and filtering in app/lib/db/logbook-database.ts (readSharedSheet) and a filterSharedSheet helper to redact sections according to share settings.
  • Expose a read helper readSharedLogSheet in app/lib/logbook-store.ts, add a JSON endpoint at app/api/shared/logbooks/[sheetId]/route.ts, and a public UI at app/share/[sheetId]/page.tsx to display shared sheets.
  • Add owner-facing sharing controls in the app UI (LogbookDetailsPage.tsx and LogbookApp.tsx) with updateActiveSheetShare to persist changes.
  • Update repository tests to account for persisted sharing columns and default values (tests/app/lib/repositories/log-sheets-repository.test.ts).

Testing

  • Ran typecheck with npm run typecheck and the build passed successfully.
  • Ran linter with npm run lint and no issues were reported.
  • Ran unit tests with npm test (including targeted runs for tests/app/api/logbook-route.test.ts, tests/app/lib/repositories/log-sheets-repository.test.ts, and tests/app/lib/db/migrations.test.ts) and all tests passed.

Codex Task

@ultimate ultimate added the codex Things in relation to codex (caused by codex or good task for codex) label Jul 15, 2026 — with ChatGPT Codex Connector
@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ultilog Ready Ready Preview, Comment Jul 18, 2026 9:50pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex Things in relation to codex (caused by codex or good task for codex)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant