Compare commits

...
4 Commits
Author SHA1 Message Date
ginnoir 0be93d088b chore: release v0.6.9
CI / checks (push) Skipped
Release Image / build-and-push (push) Successful in 8m21s
2026-07-18 17:23:06 -05:00
ginnoir 832e7265c9 fix: build share urls from auth_url instead of localhost
docker build sets next_public_app_url to localhost; preferring it over
runtime auth_url made prod share links point at localhost:3000.
2026-07-18 17:22:58 -05:00
ginnoir d1e295165a chore: release v0.6.8
CI / checks (push) Skipped
Release Image / build-and-push (push) Successful in 9m8s
2026-07-18 17:19:56 -05:00
ginnoir 969521ac3f fix: restore share and note scrolling on ios pwa
bare routes lacked a scrollport under overflow:hidden html/body.
wide rich-text tables used overflow-x:auto alone, which computes
overflow-y:auto and traps vertical touch on iphone. force ink palette
on /s/* for a consistent public share look.
2026-07-18 17:19:41 -05:00
10 changed files with 64 additions and 11 deletions
+12
View File
@@ -1,5 +1,17 @@
# Changelog # Changelog
## [0.6.9](https://github.com/ginnoir/famapp/compare/v0.6.8...v0.6.9) (2026-07-18)
### Bug Fixes
- build share urls from auth_url instead of localhost ([832e726](https://github.com/ginnoir/famapp/commit/832e7265c9354edf86f28f72f129ee34da8c3d04))
## [0.6.8](https://github.com/ginnoir/famapp/compare/v0.6.7...v0.6.8) (2026-07-18)
### Bug Fixes
- restore share and note scrolling on ios pwa ([969521a](https://github.com/ginnoir/famapp/commit/969521ac3f527a939988053b453881ed3560eb61))
## [0.6.7](https://github.com/ginnoir/famapp/compare/v0.6.6...v0.6.7) (2026-07-13) ## [0.6.7](https://github.com/ginnoir/famapp/compare/v0.6.6...v0.6.7) (2026-07-13)
### Bug Fixes ### Bug Fixes
+2
View File
@@ -16,7 +16,9 @@ ENV CI=true
ENV NEXT_TELEMETRY_DISABLED=1 ENV NEXT_TELEMETRY_DISABLED=1
ENV DATABASE_URL=postgres://build:build@localhost:5432/build ENV DATABASE_URL=postgres://build:build@localhost:5432/build
ENV AUTH_SECRET=build-time-placeholder ENV AUTH_SECRET=build-time-placeholder
# Build-only placeholder. Runtime public URL is AUTH_URL from stack.env — never prefer this.
ENV NEXT_PUBLIC_APP_URL=http://localhost:3000 ENV NEXT_PUBLIC_APP_URL=http://localhost:3000
ENV AUTH_URL=http://localhost:3000
COPY . . COPY . .
RUN pnpm install --offline --frozen-lockfile RUN pnpm install --offline --frozen-lockfile
RUN --mount=type=cache,id=famapp-nextjs,target=/app/.next/cache \ RUN --mount=type=cache,id=famapp-nextjs,target=/app/.next/cache \
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "famapp", "name": "famapp",
"version": "0.6.7", "version": "0.6.9",
"private": true, "private": true,
"type": "module", "type": "module",
"packageManager": "pnpm@10.33.3", "packageManager": "pnpm@10.33.3",
+13 -2
View File
@@ -725,9 +725,19 @@
.scroll-area { .scroll-area {
flex: 1; flex: 1;
overflow: auto; overflow-x: hidden;
overflow-y: auto;
padding: 20px 24px 60px; padding: 20px 24px 60px;
} }
/* Bare routes (/s/*, /login, signed-out) — same scrollport as .scroll-area
without app chrome padding. Needed because html/body are overflow:hidden. */
.bare-scroll {
height: 100%;
height: 100dvh;
overflow-x: hidden;
overflow-y: auto;
}
:where(html[data-nav="bottom"]) .scroll-area, :where(html[data-nav="bottom"]) .scroll-area,
:where(html[data-nav="fab"]) .scroll-area { :where(html[data-nav="fab"]) .scroll-area {
padding: 12px 14px 74px; padding: 12px 14px 74px;
@@ -1617,7 +1627,8 @@ select {
} }
/* Momentum scrolling + prevent page bounce fighting in-app scroll */ /* Momentum scrolling + prevent page bounce fighting in-app scroll */
.scroll-area { .scroll-area,
.bare-scroll {
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
overscroll-behavior-y: contain; overscroll-behavior-y: contain;
} }
+14 -1
View File
@@ -1,4 +1,5 @@
import type { Metadata, Viewport } from "next"; import type { Metadata, Viewport } from "next";
import { headers } from "next/headers";
import "./globals.css"; import "./globals.css";
import { Inter, Source_Serif_4, Newsreader, Fraunces, JetBrains_Mono } from "next/font/google"; import { Inter, Source_Serif_4, Newsreader, Fraunces, JetBrains_Mono } from "next/font/google";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
@@ -71,9 +72,13 @@ export const metadata: Metadata = {
// Pre-paint: read user's theme prefs from localStorage and apply data-* + .dark. // Pre-paint: read user's theme prefs from localStorage and apply data-* + .dark.
// Falls back to clay/serif-sans/regular/sidebar/system if nothing is stored. // Falls back to clay/serif-sans/regular/sidebar/system if nothing is stored.
// Public share pages always use ink so guests get a neutral, consistent look.
const prePaintScript = `(function(){ const prePaintScript = `(function(){
try { try {
var palette = localStorage.getItem('themePalette') || localStorage.getItem('theme') || 'clay'; var isShare = location.pathname.indexOf('/s/') === 0;
var palette = isShare
? 'ink'
: (localStorage.getItem('themePalette') || localStorage.getItem('theme') || 'clay');
var mode = localStorage.getItem('themeMode') || 'system'; var mode = localStorage.getItem('themeMode') || 'system';
var fontPair = localStorage.getItem('themeFontPair') || 'serif-sans'; var fontPair = localStorage.getItem('themeFontPair') || 'serif-sans';
var density = localStorage.getItem('themeDensity') || 'regular'; var density = localStorage.getItem('themeDensity') || 'regular';
@@ -106,6 +111,10 @@ export default async function RootLayout({ children }: { children: React.ReactNo
let assistantName = DEFAULT_ASSISTANT_NAME; let assistantName = DEFAULT_ASSISTANT_NAME;
let assistantModel: string | null = null; let assistantModel: string | null = null;
const headersList = await headers();
const pathname = headersList.get("x-pathname") ?? "";
const isSharePage = pathname === "/s" || pathname.startsWith("/s/");
const session = await auth(); const session = await auth();
if (session?.user?.id) { if (session?.user?.id) {
signedIn = true; signedIn = true;
@@ -146,6 +155,10 @@ export default async function RootLayout({ children }: { children: React.ReactNo
.orderBy(asc(dashboards.position), asc(dashboards.createdAt)); .orderBy(asc(dashboards.position), asc(dashboards.createdAt));
} }
if (isSharePage) {
palette = "ink";
}
// Server-side initial dark guess: only for `dark` mode (system mode is corrected // Server-side initial dark guess: only for `dark` mode (system mode is corrected
// before paint by the inline script). Avoids a flash on signed-in users. // before paint by the inline script). Avoids a flash on signed-in users.
const isDark = mode === "dark"; const isDark = mode === "dark";
+2 -1
View File
@@ -24,7 +24,8 @@ export async function AppShell({ signedIn, navStyle, children }: Props) {
if (bare || !signedIn) { if (bare || !signedIn) {
// No shell — share viewer and signed-out pages render bare. // No shell — share viewer and signed-out pages render bare.
return <>{children}</>; // html/body are overflow:hidden for the app grid; bare pages need their own scroller.
return <div className="bare-scroll">{children}</div>;
} }
const useTopVariant = navStyle === "top-nav"; const useTopVariant = navStyle === "top-nav";
+8
View File
@@ -64,6 +64,9 @@
margin: 0.8em 0; margin: 0.8em 0;
max-width: 100%; max-width: 100%;
overflow-x: auto; overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
overscroll-behavior-x: contain;
padding: 0.75rem 0.9rem; padding: 0.75rem 0.9rem;
} }
@@ -91,7 +94,12 @@
display: block; display: block;
margin: 0.8em 0; margin: 0.8em 0;
max-width: 100%; max-width: 100%;
/* overflow-x alone computes overflow-y to auto, which traps vertical
touch scrolling on iOS when a wide table fills the viewport. */
overflow-x: auto; overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
overscroll-behavior-x: contain;
width: max-content; width: max-content;
} }
+8
View File
@@ -0,0 +1,8 @@
/** Public origin for absolute links. AUTH_URL wins — Docker build sets NEXT_PUBLIC to localhost. */
export function getAppPublicUrl(): string {
const raw =
process.env.AUTH_URL?.trim() ||
process.env.NEXT_PUBLIC_APP_URL?.trim() ||
"http://localhost:3000";
return raw.replace(/\/$/, "");
}
+2 -3
View File
@@ -1,6 +1,7 @@
import { createHash, randomBytes } from "crypto"; import { createHash, randomBytes } from "crypto";
import { and, eq, isNull } from "drizzle-orm"; import { and, eq, isNull } from "drizzle-orm";
import type { ApiAuthContext } from "@/lib/api-auth"; import type { ApiAuthContext } from "@/lib/api-auth";
import { getAppPublicUrl } from "@/lib/app-url";
import { db } from "@/lib/db"; import { db } from "@/lib/db";
import { getEntityType, getRegistry } from "./registry"; import { getEntityType, getRegistry } from "./registry";
import { shareLinks } from "./schema"; import { shareLinks } from "./schema";
@@ -27,9 +28,7 @@ function hashToken(raw: string): string {
} }
function buildUrl(token: string): string { function buildUrl(token: string): string {
const base = return `${getAppPublicUrl()}/s/${token}`;
process.env["NEXT_PUBLIC_APP_URL"] ?? process.env["AUTH_URL"] ?? "http://localhost:3000";
return `${base}/s/${token}`;
} }
export function listShareableEntityTypes() { export function listShareableEntityTypes() {
+2 -3
View File
@@ -2,6 +2,7 @@
import { createHash, randomBytes } from "crypto"; import { createHash, randomBytes } from "crypto";
import { and, eq, isNull } from "drizzle-orm"; import { and, eq, isNull } from "drizzle-orm";
import { getAppPublicUrl } from "@/lib/app-url";
import { db } from "@/lib/db"; import { db } from "@/lib/db";
import { getCurrentSession } from "@/lib/session"; import { getCurrentSession } from "@/lib/session";
import { getEntityType } from "./registry"; import { getEntityType } from "./registry";
@@ -21,9 +22,7 @@ function hashToken(raw: string): string {
} }
function buildUrl(token: string): string { function buildUrl(token: string): string {
const base = return `${getAppPublicUrl()}/s/${token}`;
process.env["NEXT_PUBLIC_APP_URL"] ?? process.env["AUTH_URL"] ?? "http://localhost:3000";
return `${base}/s/${token}`;
} }
export async function createShareLink( export async function createShareLink(