Commit graph

858 commits

Author SHA1 Message Date
Yussif Mohammed
30ffd443be add "GitHub Integration" option to project notifications page 2025-12-24 21:41:59 +00:00
Anthony Alaribe
5cd948697f
Teams improvement v2 (#234)
* Improve dashboards and teams UI with star functionality

- Add star/unstar functionality for dashboards with persistent state
- Update dashboard sorting to prioritize starred items
- Improve table component styling and layout
- Add icons for dashboards and teams in list views
- Streamline table columns and remove unnecessary checkboxes
- Update bulk actions to use new table component features

* Auto-format code with fourmolu

* Fix teams bulk actions to use itemId field

Update TBulkActionForm to use itemId instead of teamId to match
the Table component's standardized field name for bulk actions.

* Improve settings navigation layout and styling

- Reduce navigation width for better space utilization
- Update font sizes and spacing for cleaner appearance
- Improve icon styling with background colors
- Enhance navigation item padding and layout

* Refactor API keys page to use Table component and add client-side tab support

- Enhanced TabFilter component to support both client-side and server-side tabs
- Added clientSide boolean field to TabFilter for tab switching mode
- Added targetId field to TabFilterOpt for custom element targeting
- Refactored API keys page to use reusable Table component
- Updated all existing TabFilter usage to include new fields
- Improved consistency across table implementations

* Auto-format code with fourmolu

* nitpicks on

* add test for starring and unstarring, and dashboard default sorting

* Fix tagify scope issue in dashboard creation modal

The tagify variable was scoped inside DOMContentLoaded event listener,
causing a reference error when getSelectedTeams() tried to access it
during form submission. Moved declaration to outer scope.

* Fix gridStackInstance null error when adding dashboard widgets

* Fix teams badge WCAG contrast by using badge-neutral

* Fix compilation errors

- Fix do-notation errors by adding proper do blocks instead of using >> after $
- Rename local section_ helper to teamSection_ to avoid shadowing
- Remove unused ProjectId parameter from renderMonitorContent

* Use brackets instead of do-blocks for single-line expressions

- Keep code on one line by using parentheses and >> operator
- Applied to card_, notifRow_, lazySection_, teamSection_, field_, fieldIcon_ helpers

* Apply code formatting updates

- Replace font-mono with monospace class
- Minor whitespace adjustments

* Fix duplicate html assignment bug and simplify code

* Auto-format code with fourmolu

* Refactor tables to use standardized Table component with sorting

- Add containerId to Table Config for HTMX targeting
- Add renderAsTable mode for proper table rendering
- Add rowId and rowAttrs to TableRows for load-more consistency
- Fix th elements to include column attrs for alignment
- Fix class concatenation spacing in table headers
- Fix scrolling in BodyWrapper (overflow-y-hidden to overflow-y-auto)
- Add sort parameter to Issues.selectIssues
- Refactor Anomalies and ApiCatalog to use TableHeaderActions
- Remove flex classes from table cells

* Auto-format code with fourmolu

* Fix table load more by moving pagination inside tbody

- Move pagination link inside tbody for table mode (as a <tr>)
- Add renderTablePaginationLink with hx-target='closest tr'
- Add id to tbody for targeting
- Pagination row gets replaced with new rows + new pagination row

* Refactor Anomalies table to use built-in checkbox

- Remove custom checkbox column (use table's rowId feature instead)
- Add status indicator dot to Issue column title row
- Update TableRows to use proper rowId for load more

* Auto-format code with fourmolu

* Fix Anomalies issue column layout structure

- Fix indentation so metadata, stats, actions are separate blocks
- Status indicator dot in title row
- Condense code using single-line patterns where appropriate

* Auto-format code with fourmolu

* Merge renderPaginationLink and renderTablePaginationLink into single function

* Auto-format code with fourmolu

* Align row checkboxes to top and add vertical padding to issue column

* Improve settings sidebar: larger text, neutral icons, stronger selection highlight

* Widen settings sidebar

* Fix hlint warnings

* Fix all hlint warnings across codebase

* Auto-format code with fourmolu

* Fix GHC warnings: dodgy import, name shadowing, unused do-bind

* Use foldMap and zipWithM_ for cleaner iteration patterns

* Extract columnCount helper and add error handling for processVariable

* Auto-format code with fourmolu

* Optimize URL construction and use single-pass fold for change counting

* Extract issueTypeBadge helper to reduce code duplication

* Fix SQL injection vulnerabilities and semantic error in change counting

* Auto-format code with fourmolu

* Simplify SQL validation and remove redundant variable

* Auto-format code with fourmolu

* Rename selectDashboardsSorted to selectDashboardsSortedBy for clarity

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-19 23:44:55 +01:00
Anthony Alaribe
9521695299
Teams rebased (#233)
* 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>
2025-12-18 23:38:00 +01:00
Yussif Mohammed
a85be17184
Cherry pick files (#232)
* cherry pick files

* Auto-format code with fourmolu

* add more files

* Auto-format code with fourmolu

* finx undefined var

* review changes

* Auto-format code with fourmolu

* discord channel' type rename

* Auto-format code with fourmolu

* claude rec fixes

* Auto-format code with fourmolu

* fix notification typo

* Auto-format code with fourmolu

* discord get channel log error

* fix typo

* rm reswap related code from System.Types.hs

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com>
2025-12-18 12:13:39 +01:00
Anthony Alaribe
2d893b8520
Fix Platform colors to reduce eye strain (#231)
* Fix badge-neutral contrast for better readability

* Remove unused CSS utilities and variables

* Adjust dark mode to premium blue aesthetic

- Darker backgrounds (15-18% vs 18-22%) for high-quality look
- Maintains visible blue tint with 0.020 chroma
- Improved text contrast ratios (textStrong: 14.58:1)
- All combinations pass WCAG AA standards

* Add surface-raised utility class for elevated surfaces

- Created .surface-raised class with bgRaised, border, and shadow
- Applied to project cards for better contrast against background
- Applied to all tables (API Catalog, Issues, etc.) via Table component
- Fixed monitor alert icons padding for uniform appearance
- Provides consistent raised platform aesthetic across the app

* revert color

* Enhance surface-raised with dimensional lighting effects

Add subtle gradient and inset shadows for 3D depth, update background
to use fillWeaker color, and apply surface-raised utility to widgets.

* Replace card-round with surface-raised for consistency

Apply surface-raised styling to all cards including stat boxes, list items,
and anomalies widget. Remove unused card-round CSS class.
2025-12-17 11:51:37 +01:00
Anthony Alaribe
9527fa7571 Reorganize project structure
Move config files to config/ directory (tailwind.config.js, workbox-config.js, weeder.toml). Move documentation to docs/ (DEVELOPMENT.md, DOCKER_COMPOSE_README.md). Update all references in Dockerfile, Makefile, tailwind.css, and documentation.
2025-12-17 00:49:42 +01:00
Anthony Alaribe
638df4392b Add visualization type support for alerts
- Add visualization_type column to query_monitors table

- Store and load visualization type when creating/editing alerts

- Update alert edit links to include query and viz_type parameters

- Fix alert form POST endpoint path (/p/<pid>/monitors/alerts)

- Fix visualizationTabs_ to respect vizTypeM when in alert mode

- Add getVizType() JS helper function
2025-11-27 23:29:55 +01:00
Anthony Alaribe
229f0d7e2d Use CSS @apply for badge classes instead of Haskell helpers
- Add .badge and .badge-outline CSS classes with @apply in tailwind.css
- Remove badge_, badgeOutline_, badgeClass from Utils.hs (-19 lines)
- Update AnomalyList.hs to use CSS classes directly
2025-11-26 22:39:13 +01:00
Anthony Alaribe
2b61520857 service worker regeneration 2025-11-25 23:45:12 +01:00
Anthony Alaribe
ffed69147d sprite changes 2025-11-23 19:52:40 +01:00
Anthony Alaribe
0e08e7fea7 Simplify telemetrygen banner by removing icon 2025-11-23 19:52:40 +01:00
Anthony Alaribe
6a9ec7dcc8
Support the has_all and has_any operators, then Remove flamegraph widget and increase recent traces height (#209)
* Support the has_all and has_any operators

* Remove flamegraph widget and increase recent traces height in overview dashboard
2025-11-23 14:25:27 +01:00
Yussif Mohammed
9ec59274f4 minor fixes 2025-11-21 19:43:34 +00:00
Anthony Alaribe
d024a55a2d Improve dark mode consistency and fix UI elements
- Convert all text colors to oklch with blue saturation for consistent theming
- Update DaisyUI theme colors to use solid oklch values for better visibility
- Fix progress bar transparency issues in both light and dark modes
- Add missing SVG sprite icons: alert-circle, activity, route, routes
- Update base colors to use oklch with proper blue tint
2025-11-18 22:40:41 +01:00
Anthony Alaribe
a1a9f8a371 Adjust dark mode background colors for better contrast
Update dark mode background to 14% lightness with increased blue saturation for improved visual comfort and brand consistency.
2025-11-18 22:40:41 +01:00
Yussif Mohammed
6034559e31 towards trace shape flame graph 2025-11-17 18:58:24 +00:00
Yussif Mohammed
60aa4ae653
New Reports UI (#207)
* checkpoint

* span overview checkpoint

* reports checkpoint, slow queries

* empty state

* auto load first report

* format

* fetch and save neccesary chart data for report

* feat: issues breakdown

* touches

* issues id

* format
2025-11-13 07:45:20 +00:00
Yussif Mohammed
2b129af05e towards traces widget 2025-11-04 21:18:20 +00:00
Anthony Alaribe
7d4d27e15c reduce the paddings of the tabs 2025-11-02 13:57:50 +01:00
Anthony Alaribe
42a7a30261 fix the cursor handling logic for query logs. And add performance logic and checks so we can find out whats making the query-editor sluggish 2025-10-31 18:11:11 +01:00
Anthony Alaribe
5b8c6ca5b0 fix rendering of the latency charts to calculate units. also fix select dropdowns which were transparent across the app. etc 2025-10-26 23:45:16 +01:00
Anthony Alaribe
614715b313 fix tests and reduce default limit to 500 for weaker conections 2025-10-26 23:10:32 +01:00
Anthony Alaribe
b774d51c69 fix chart and timepicker dropdown behavior to collapse after use. 2025-10-26 00:43:15 +02:00
Anthony Alaribe
a3b60fa71b increatse the query limits on the overview dashboard chart queries 2025-10-26 00:43:15 +02:00
Anthony Alaribe
e4bec5a3c3 checkpoint to tables where you can select a row variable 2025-10-12 15:34:58 +02:00
Anthony Alaribe
3e6e79d97d improve queries for the databases tab 2025-10-11 22:53:44 +02:00
Anthony Alaribe
8c9fd7ed12 pretty render column calues and progress in table widgets 2025-10-11 21:53:01 +02:00
Anthony Alaribe
4eaa7eceb1 introduce progress column in tables, with column variant 2025-10-11 16:47:38 +02:00
Anthony Alaribe
f2ce25cd77 limit the resoruce charts to top 20 2025-10-11 16:08:18 +02:00
Anthony Alaribe
496f914bd5 correctly identify the resource columsn 2025-10-11 15:53:03 +02:00
Anthony Alaribe
3717c9f823 update overview dash 2025-10-11 13:24:50 +02:00
Anthony Alaribe
738cc0937f fix the events by endpoints query in overview dashboard 2025-09-29 21:58:15 +02:00
Anthony Alaribe
7ad4c233d2
support trace summaries and resources in dashbaords (#198)
* support trace summaries and resources in dashbaords

* temporarily comment out most widgets

* checkpoint

* render the overview page

* improve dash

* only calculate duration stats on rows with none null durations

* improve dashboard overview tab behavior

* checkpoint

* checkpoint

* make fmt
2025-09-27 18:09:38 +02:00
Anthony Alaribe
3ee92fe140 regen service worker file with hash in the dockerfile 2025-09-20 12:49:24 +02:00
Anthony Alaribe
2f32accb97
Performance optimization (#196)
* use details and summary for presets dropdown.

* tiny query lib improvements

* improve the list better

* allow deletes remove and update list via htmx

* x

* reduce dom count of the facets elements.

* checkpoint

* fix not collapsing parent without children

* remove codemirrow

* enable source maps, update echarts, update tailwind, etc

* cleanup listeners and be more lazy in session reploay

* onboarding
2025-09-20 02:07:33 +02:00
Anthony Alaribe
c6fbc3af27 remove old monaco files so their no loaded, incase they impact performance. and remove step-assertions 2025-09-17 18:42:57 +02:00
Anthony Alaribe
218a695f10 remove webcomponent dist 2025-09-16 18:41:06 +02:00
Yussif Mohammed
a8abbbed4c rm test editorß 2025-09-15 21:37:11 +00:00
Yussif Mohammed
830c05469b remove bg-raised class 2025-09-15 15:53:43 +00:00
Yussif Mohammed
9479985727 fix api logs page 2025-09-15 07:58:04 +00:00
Anthony Alaribe
4b4ed0252a rename project to monoscope 2025-09-14 19:55:26 +02:00
Anthony Alaribe
76b2365cc9 build everything in multistage docker images. 2025-09-14 19:12:41 +02:00
Anthony Alaribe
6e948c7bd6 update service worker 2025-09-13 20:07:01 +02:00
Anthony Alaribe
cb47d0a1f2
Optimize log explorer (#194)
* reduce repaint due to css operations

* rerender at right time

* fix performance issue in log explorer.

* proper recent

* fix issue with fetch recent not actually fetching recent data.

* fix bug so load more uses the actual latest timestamp of the last log item in the vitual table. not depending on the response from hte server

* fix the add new column experience to refresh the data not just append, which breaks the explorer

* make fmt
2025-09-13 18:11:23 +02:00
Yussif Mohammed
37395b2643 remove console logs 2025-09-13 15:15:16 +00:00
Yussif Mohammed
ccfc682b64 update service worker 2025-09-13 15:14:22 +00:00
Yussif Mohammed
9e2550e1a3 fix test 2025-09-13 14:09:14 +00:00
Yussif Mohammed
b2b83dc357 reduce the number of events fetched per load 2025-09-13 12:50:51 +00:00
Yussif Mohammed
fb3427c81e remove console 2025-09-12 14:34:37 +00:00
Yussif Mohammed
5f0138e37f fix next fetch 2025-09-12 14:23:42 +00:00