Skip to content

Commit 6052b70

Browse files
michaelmcneesclaude
andcommitted
fix: address all 6 Copilot review comments on PR #4
1. sslmode=disable → sslmode=prefer (tries TLS, graceful fallback for local dev) 2. grpc bump is intentional (CVE-2026-33186) — already noted in PR description 3. Table scroll comment updated to match unconditional behavior 4. isDocs derived from pathname (/docs prefix) not !isHome — fixes 404 page 5. 404 page gets pb-20 for mobile bottom nav clearance 6. Broken /configuration link → /docs/configuration in getting-started Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4703821 commit 6052b70

6 files changed

Lines changed: 7 additions & 7 deletions

File tree

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func Load(cmd *cobra.Command) (*Config, error) {
129129
v := viper.New()
130130

131131
// Defaults
132-
v.SetDefault("database.url", "postgres://mantle:mantle@localhost:5432/mantle?sslmode=disable")
132+
v.SetDefault("database.url", "postgres://mantle:mantle@localhost:5432/mantle?sslmode=prefer")
133133
v.SetDefault("database.max_open_conns", 25)
134134
v.SetDefault("database.max_idle_conns", 25)
135135
v.SetDefault("database.conn_max_lifetime", 5*time.Minute)

internal/config/config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestLoad_Defaults(t *testing.T) {
2929
t.Fatalf("Load() error = %v", err)
3030
}
3131

32-
if cfg.Database.URL != "postgres://mantle:mantle@localhost:5432/mantle?sslmode=disable" {
32+
if cfg.Database.URL != "postgres://mantle:mantle@localhost:5432/mantle?sslmode=prefer" {
3333
t.Errorf("Database.URL = %q, want default", cfg.Database.URL)
3434
}
3535
if cfg.API.Address != ":8080" {
@@ -97,7 +97,7 @@ func TestLoad_ImplicitConfigMissing_UsesDefaults(t *testing.T) {
9797
t.Fatalf("Load() error = %v, want nil (silent fallback)", err)
9898
}
9999

100-
if cfg.Database.URL != "postgres://mantle:mantle@localhost:5432/mantle?sslmode=disable" {
100+
if cfg.Database.URL != "postgres://mantle:mantle@localhost:5432/mantle?sslmode=prefer" {
101101
t.Errorf("Database.URL = %q, want default", cfg.Database.URL)
102102
}
103103
}

site/src/components/Nav.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ interface Props {
44
}
55
const { isHome = false } = Astro.props;
66
const prefix = isHome ? '' : '/';
7-
const isDocs = !isHome;
7+
const isDocs = Astro.url.pathname.startsWith('/docs');
88
---
99
<nav class="fixed top-0 left-0 right-0 z-50 border-b border-outline-variant bg-surface/80 backdrop-blur-md">
1010
<div class={`nav-inner mx-auto px-6 flex items-center justify-between h-16 ${isHome ? 'max-w-[1200px]' : 'max-w-[1280px]'}`}>

site/src/content/docs/getting-started/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The default database URL uses `sslmode=disable`, which is correct for local deve
4040
export MANTLE_DATABASE_URL="postgres://mantle:secret@db.example.com:5432/mantle?sslmode=require"
4141
```
4242

43-
See [Configuration](/configuration) for all database options.
43+
See [Configuration](/docs/configuration) for all database options.
4444

4545
You should see:
4646

site/src/pages/404.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Nav from '../components/Nav.astro';
44
---
55
<Base title="404 — Route Not Found | Mantle">
66
<Nav />
7-
<main class="min-h-screen flex items-center justify-center pt-16">
7+
<main class="min-h-screen flex items-center justify-center pt-16 pb-20 md:pb-0">
88
<div class="mx-auto max-w-[700px] px-6 py-24">
99
<h1 class="font-headline text-4xl sm:text-5xl font-bold tracking-tight mb-8">
1010
404: Route Not Found

site/src/styles/global.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ body {
317317
margin-top: 0;
318318
}
319319

320-
/* Tables — horizontally scrollable on small screens */
320+
/* Tables — display:block enables horizontal scroll when content overflows */
321321
.prose table {
322322
display: block;
323323
width: 100%;

0 commit comments

Comments
 (0)