* refactor: migrate from pg-transact to effectful-postgresql
Replace pg-transact and pg-transact-effectful with effectful-postgresql for database operations. Key changes: replace DB effect with WithConnection, remove dbtToEff wrappers, use direct PG.query/PG.execute calls, update runDB to runWithConnectionPool, keep pg-entity for query building, add IOE constraint alongside WithConnection where needed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
* Auto-format code with fourmolu
* chore: use effectful-postgresql fork with OpenTelemetry support
Switch to tonyalaribe/effectful-postgresql fork (instrument-pg branch) and
enable the +enable-otel flag for OpenTelemetry instrumentation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
* fix: improve connection usage and error handling in BackgroundJobs
- Use PG.execute directly instead of multiple withConnection calls for
CleanupDemoProject (more efficient connection usage)
- Handle missing project gracefully in ATRuntimeException processing
instead of crashing with error
- Clean up unused imports (PGS, withConnection)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
* fix: correct effectful-postgresql subdir path
🤖 Generated with [Claude Code](https://claude.com/claude-code)
* fix: add proper error handling and logging for critical operations
- Log advisory lock release failures instead of silently ignoring
- Log when error update doesn't match any span (potential data issue)
- Log when span hash update count mismatches expected (data integrity)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
* Auto-format code with fourmolu
* refactor: simplify single-row query handling in BackgroundJobs
* refactor: return lists from model query functions instead of Vectors
PostgreSQL-simple returns lists naturally, so wrapping results with V.fromList was wasteful. Model query functions now return lists directly, with Vector conversion happening at call sites that actually need Vectors.
* Auto-format code with fourmolu
* perf: fix N+1 query pattern and improve advisory lock handling
- Replace individual UPDATE queries in forM_ loop with batched UPDATE
using SQL unnest to reduce O(n) DB round-trips to O(1)
- Add 5-minute statement timeout to advisory lock to prevent hangs
- Add timeout reset in finally block for cleanup
- Improve comments explaining session-level lock auto-release behavior
* refactor: replace verbose Only unwrapping with coerce
- Use coerce @[Only T] @[T] instead of map (\(Only x) -> x)
- Use coerce @(Maybe (Only T)) @(Maybe T) instead of fmap (\(Only x) -> x)
- Update GenerateOtelFacetsBatch to use Projects.ProjectId instead of Text
* Auto-format code with fourmolu
* fix: advisory lock release and remove unnecessary vector conversion
- Use query instead of execute for pg_advisory_unlock (SELECT returns result)
- Add validation for unexpected unlock results
- Remove unnecessary V.fromList/V.toList round-trip in runHourlyJob
* refactor: simplify COUNT(*) query result handling
Use inline maybe/listToMaybe instead of case expression for cleaner code.
* Auto-format code with fourmolu
* refactor: use catch instead of try/case for advisory lock cleanup
Cleaner error handling with catch pattern instead of explicit try + case Left/Right.
* Auto-format code with fourmolu
* perf: use V.mapMaybe and V.unzip3 to avoid list conversions
Direct Vector operations for batch error updates instead of
list mapMaybe + V.fromList.
* refactor: introduce DB type alias and switch to pg-transact
* Auto-format code with fourmolu
* fix errors in specs
* fix: remove duplicate import in Dashboards.hs
* fix: resolve integration test failures
- BusinessFlowsSpec: fix column names for apis.subscriptions table
- TestUtils: add test user as admin to nil UUID project
- System/Types: increase static UUID pool to prevent collisions
- AnomaliesSpec: fix test assertions for correct filter views
* fix aroundAll
* fix: resolve integration test failures
- Fix insertProjectMembers to handle empty list (prevents 'no rows supplied' error)
- Fix DashboardsSpec UUID collisions by grouping creations and adding cleanup
- Fix ManageMembersSpec: correct userID to UUID 1, update expected member count and email
- Fix ProjectsSpec: update expected project count to include demo project
* remove PG_EFFECT_MIGRATION.md
* fix: use unique team handles in bulk add teams test to avoid conflicts
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* towards supporting teams in projects.
* Auto-format code with fourmolu
* fix htmx json encoder extension
* improve team list
* team view side page, alerts and dashbaord next
* yeah well
* validation checks and fixes
* tiny details improvments
* prepare endpoints for testing
* Auto-format code with fourmolu
* towards tests
* Auto-format code with fourmolu
* rm monoscope-test
* fix alert creation
* more tests cases
* Auto-format code with fourmolu
* alerts page improvements bug fixes and teams link
* Auto-format code with fourmolu
* feat: alerts section, teams.
* send notifications
* Auto-format code with fourmolu
* fix errs and slack install
* Auto-format code with fourmolu
* add teams column to dashboards table
* towards table component
* Auto-format code with fourmolu
* dashbaord bulk actions delete
* dashboards with teams
* team dashboard
* Auto-format code with fourmolu
* fix table
* feat: teams bulk actions delete
* Auto-format code with fourmolu
* feat: add title field & teams to dashboard modal
* Auto-format code with fourmolu
* remove stack files and configure hie.yaml for better IDE support
* Auto-format code with fourmolu
* fix and passing tests
* Auto-format code with fourmolu
* add more tests
* add dashboards spec
* Auto-format code with fourmolu
* fix pull request workflow
* fix: review change requests
* Auto-format code with fourmolu
* feat: tagify consolidation
* Auto-format code with fourmolu
* updates
* simplifications and other changes
* background changes and fixes
* Auto-format code with fourmolu
* package yaml
* Auto-format code with fourmolu
* fix typo
* towards supporting teams in projects.
* Auto-format code with fourmolu
* improve team list
* team view side page, alerts and dashbaord next
* yeah well
* validation checks and fixes
* tiny details improvments
* prepare endpoints for testing
* Auto-format code with fourmolu
* towards tests
* Auto-format code with fourmolu
* rm monoscope-test
* more tests cases
* Auto-format code with fourmolu
* alerts page improvements bug fixes and teams link
* Auto-format code with fourmolu
* feat: alerts section, teams.
* send notifications
* Auto-format code with fourmolu
* fix errs and slack install
* Auto-format code with fourmolu
* add teams column to dashboards table
* towards table component
* Auto-format code with fourmolu
* dashbaord bulk actions delete
* dashboards with teams
* team dashboard
* Auto-format code with fourmolu
* feat: teams bulk actions delete
* Auto-format code with fourmolu
* feat: add title field & teams to dashboard modal
* Auto-format code with fourmolu
* remove stack files and configure hie.yaml for better IDE support
* Auto-format code with fourmolu
* fix and passing tests
* Auto-format code with fourmolu
* add more tests
* add dashboards spec
* Auto-format code with fourmolu
* fix: review change requests
* Auto-format code with fourmolu
* feat: tagify consolidation
* Auto-format code with fourmolu
* updates
* simplifications and other changes
* background changes and fixes
* Auto-format code with fourmolu
* package yaml
* Auto-format code with fourmolu
* Migrate to master's Table API
- Update dashboards and teams tables to use new column-based API
- Replace ItemsList.ItemsRows with Table.TableRows
- Add missing validateTeamDetails function
- Fix import conflicts
* Migrate to master's Table API and fix migration idempotency
- Update dashboards and teams tables to use new column-based API
- Replace ItemsList.ItemsRows with Table.TableRows
- Add missing validateTeamDetails function
- Fix import conflicts (Wreq.header ambiguity)
- Add IF NOT EXISTS to index creation in teams migration
* Add frosted glass backdrop to modals
- Add backdrop-filter blur effect to .modal-backdrop class
- Applies 8px blur for frosted glass effect
- Includes webkit prefix for browser compatibility
* Remove padding from table container
- Remove px-6, pt-4, and pb-16 from containerClasses
- Table now renders edge-to-edge without padding
* Add padding to non-settings page content
- Remove padding from Table component's default containerClasses
- Add px-6 pt-4 pb-16 wrapper for non-settings pages in BodyWrapper
- Settings pages (Teams, etc.) remain without extra padding
* Remove duplicate padding from dashboards list page
- Remove pb-2 px-6 pt-8 from itemsListPage div
- Padding now comes from BodyWrapper parent wrapper
- Avoids double padding on dashboards list
* Align dashboard button and table checkbox with page header
* Fix double padding issue with standardized table padding system
- Remove global padding wrapper from BodyWrapper to fix double padding
- Add addPadding config option to Table component
- Update table pages to use addPadding: Dashboards, API Catalog, Issues, Monitors
- Standardize all table padding to px-6 pt-4 pb-2
- Update Monitors page section padding to match standard
* fix tables and compilation
* Auto-format code with fourmolu
* fix dulicate line
* Auto-format code with fourmolu
* fix build
* Refactor FromJSON instances to use deriving strategies
- Use deriving via with DAE.Rename for field name transformations
- Use deriving via with DAE.StripSuffix for simple underscore removal
- Extract SlackEventPayload constructors into separate record types
- Simplify TeamForm to use deriving anyclass for internal API
- Remove unused imports
Code reduction: ~80 lines of manual JSON parsing boilerplate eliminated
* Auto-format code with fourmolu
* Add team validation and permission checks
- Add admin-only restriction for team create/update
- Validate team members are project members
- Add email format validation for notification emails
- Add length limits to team name and handle
- Verify teams exist before adding to dashboards
- Extract dispatchTeamNotifications helper in BackgroundJobs
- Use TeamDetails record to simplify createTeam/updateTeam APIs
- Handle duplicate team handles with ON CONFLICT DO NOTHING
* Auto-format code with fourmolu
* Refactor teams feature with comprehensive improvements
Code Quality & Type Safety:
- Refactor createTeam/updateTeam to use TeamDetails record type
- Add compile-time safety with NonEmpty for softDeleteProjectMembers
- Standardize SQL array syntax (lowercase uuid[], consistent spacing)
- Add phone_numbers support to all team types and queries
Performance Optimizations:
- Optimize getTeamsVM/getTeamByHandle with LEFT JOIN + array_agg
- Use for_ instead of explicit null checks
Error Handling & Observability:
- Add logging for missing/deleted teams in monitor notifications
- Improve error handling for addTeamsToDashboards
- Add graceful fallback when configured teams are deleted
Code Cleanup:
- Extract dispatchTeamNotifications helper function
- Remove redundant project query
- Use idiomatic Haskell patterns
* Auto-format code with fourmolu
* Fix variable shadowing in email validation
* Refactor for code succinctness
- Simplify NonEmpty to Vector conversion (remove redundant toList)
- Extract handleQueryMonitorThreshold into focused helper functions
- Add logMissingTeams for team logging
- Add createAndInsertIssue for issue creation
- Add calculateThreshold for threshold calculation
- Add buildMonitorAlert for alert construction
- Add sendNotifications for notification dispatch
- Add sendFallbackNotifications for fallback handling
* Auto-format code with fourmolu
---------
Co-authored-by: Yussif Mohammed <yousiph77@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Replace type synonym Projects.ProjectId with UUIDId constructor
in all test files to fix "Illegal term-level use of type constructor"
errors that occur with GHC 9.12's TypeAbstractions extension.
- Merged Pages/Telemetry/Metrics.hs and Trace.hs into Pages/Telemetry.hs
- Moved Pages/Anomalies/AnomalyList.hs to Pages/Anomalies.hs
- Moved Pages/Monitors/Alerts.hs to Pages/Monitors.hs
- Fixed FromRow type errors in several files (Only wrapper)
- Fixed import issues in Pages/Projects.hs
Simplified test code by:
- Replacing verbose toServantResponse pattern with concise testServant helper
- Changed test lambdas from \tr@TestResources{..} to \tr for cleaner syntax
- Updated field access to use dot notation (tr.trPool, tr.trATCtx, etc.)
This reduces boilerplate and improves test readability across all integration
test suites while maintaining the same functionality.
Affected test suites:
- Pages (ApiSpec, LogExplorer, Anomalies, Projects, Endpoints, Reports,
Monitors, BusinessFlows, Share)
- MonitoringSpec
- ProcessMessageSpec
Update integration tests to use the new TestResources pattern for better
test organization and consistency.
Changes:
- Replace withSetup callback with withTestResources
- Use runTestBg helper instead of runTestBackground
- Access test resources via TestResources record fields
- Remove redundant imports (execute from DBT)
- Simplify test setup code
This refactoring improves test readability and reduces boilerplate.