Skip to content

Export page#6

Open
tmshv wants to merge 22 commits intomainfrom
feature-export-page
Open

Export page#6
tmshv wants to merge 22 commits intomainfrom
feature-export-page

Conversation

@tmshv
Copy link
Copy Markdown
Member

@tmshv tmshv commented Feb 26, 2026

No description provided.

tmshv added 22 commits February 26, 2026 03:44
…tching

Add frontend/src/lib/pocketbase.ts with browser-singleton PocketBase instance,
loginAsSuperuser(), fetchAllFeatures(), and fetchAllSurveys() functions.
- expandsliderList questions in surveysToCsv (same key pattern as selectList, was producing empty columns for all 23 slider items)
- fix downloadCsv to append anchor to DOM before click and defer revokeObjectURL to avoid Firefox download failure
- remove redundant isAdmin check in loginAsSuperuser (_superusers collection enforces superuser-only auth)
- make FeatureRecord.feature optional to match defensive optional-chaining access at call site
- add setLoading(false) in success path of LoginForm.onSubmit before calling onSuccess
- Fix CSV escaping to also quote cells containing carriage returns (\r)
  to prevent row corruption with Windows line endings in user text
- Remove unused "loading" and "error" variants from ExportAuthState type
  since authState only transitions idle → authenticated
Restore missing isSuperuser guard in loginAsSuperuser per original plan.
- Add server-side filter for banned records in fetchAllFeatures to
  prevent banned content from being transmitted to the browser
- Remove unreachable isSuperuser guard that was dead code after
  successful _superusers authWithPassword
- Remove redundant client-side isBanned filter (server-side filter already handles this)
- Make FeatureRecord.feature.geometry optional to match actual usage with optional chaining
- Upgrade pocketbase SDK from 0.22.1 to 0.26.8 (latest) to better match server v0.36.5
- Add "use client" directive to pocketbase.ts to enforce client-only boundary at module level
- Add re-auth button in data error state so users can return to login without page refresh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant