Commit graph

77 commits

Author SHA1 Message Date
Nick Misasi
0885f56010
Add optional Claude.md orchestration for Webapp folder (#34668)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Blocked by required conditions
Web App CI / check-types (push) Blocked by required conditions
Web App CI / test (platform) (push) Blocked by required conditions
Web App CI / test (mattermost-redux) (push) Blocked by required conditions
Web App CI / test (channels shard 1/4) (push) Blocked by required conditions
Web App CI / test (channels shard 2/4) (push) Blocked by required conditions
Web App CI / test (channels shard 3/4) (push) Blocked by required conditions
Web App CI / test (channels shard 4/4) (push) Blocked by required conditions
Web App CI / upload-coverage (push) Blocked by required conditions
Web App CI / build (push) Blocked by required conditions
* Add CLAUDE.md documentation files for webapp directories

- Add root webapp CLAUDE.md with overview and build commands
- Add channels CLAUDE.md with architecture and testing info
- Add documentation for actions, components, selectors, utils
- Add documentation for sass, tests, and mattermost-redux
- Add platform documentation for client and types
- Update .gitignore

* Add CLAUDE docs and allow tracking

* Clarify CLAUDE instructions for i18n workflow

* Refactor webapp/CLAUDE.md into a nested hierarchy

Decomposed the monolithic webapp/CLAUDE.md into focused, context-aware
files distributed across the directory structure:
- webapp/CLAUDE.md (Root overview)
- webapp/channels/CLAUDE.md (Channels workspace)
- webapp/channels/src/components/CLAUDE.md
- webapp/channels/src/actions/CLAUDE.md
- webapp/channels/src/selectors/CLAUDE.md
- webapp/channels/src/packages/mattermost-redux/CLAUDE.md
- webapp/platform/CLAUDE.md (Platform workspace)
- webapp/platform/client/CLAUDE.md

* Move files to optional, then add script to move them to proper claud.md
2026-01-14 13:04:20 -05:00
M-ZubairAhmed
f800025a43
[MM-63884] Move DynamicVirtualizedList to monorepo (#30851) 2025-05-22 11:27:24 +05:30
sabril
2116a6d94a
MM-64282 E2E/Playwright: Test documentation format (#31050)
* initial implementation of test documentation in spec file with AI-assisted prompt from Claude and linter script

* update snapshots

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-05-20 01:07:47 +08:00
Agniva De Sarker
efde5e2717
[AI assisted] MM-62755: Refactor scanning to map to a util (#30780)
With some neat generics, I was able to refactor
the scanning to a util function. I used it to
refactor 3 places and also removed an unnecessary method.

Claude was quite good here.

https://mattermost.atlassian.net/browse/MM-62755
```release-note
NONE
```
2025-04-28 19:21:12 +05:30
Agniva De Sarker
d8dbb6cc22
MM-56548: [AI assisted]Add support for incremental thread loading using UpdateAt timestamp (#30486)
Every time we load the RHS, we used to load the FULL thread always. Although
the actual ThreadViewer React component is virtualized, and the server side
API call is paginated, we still went through all the pages, to get the full
thread and passed it on to the ThreadViewer. This would be for first loads,
and subsequent loads of the same thread.

This was a bug originally, but then it was a necessity after we applied websocket event scope because
now we won't get emoji reactions of a thread if the user is not on the thread.

To fix that, we enhance the thread loading functionality by adding support for fetching
thread updates based on the UpdateAt timestamp. Now, for subsequent loads,
we only get the changed posts in a thread. The implementation:

- Adds new API parameters: fromUpdateAt and updatesOnly to the GetPostThread endpoint
- Updates database queries to support sorting and filtering by UpdateAt
- Implements thread state management to track the last update timestamp
- Adds client-side support to use incremental loading for improved performance
- Ensures proper validation for parameter combinations and error handling

This change enables more efficient thread loading, particularly for long threads
with frequent updates, by only fetching posts that have been updated since the
last view.

Caveats: For delta updates, the SQL query won't use the best index possible
because we have an index for (CreateAt, Id), but no index for (UpdateAt, Id).
However, from my tests, it is not as bad as it looks:

```
[loadtest] # EXPLAIN (ANALYZE, BUFFERS) SELECT * FROM Posts WHERE Posts.DeleteAt = 0 AND Posts.RootId = 'qbr5gctu9iyg8c36hpcq6f3w8e' AND Posts.UpdateAt > 1623445795824 ORDER BY UpdateAt ASC, Id ASC LIMIT 61;
                                                                   QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=8.31..8.31 rows=1 width=216) (actual time=0.047..0.049 rows=0 loops=1)
   Buffers: shared hit=2
   ->  Sort  (cost=8.31..8.31 rows=1 width=216) (actual time=0.044..0.045 rows=0 loops=1)
         Sort Key: updateat, id
         Sort Method: quicksort  Memory: 25kB
         Buffers: shared hit=2
         ->  Index Scan using idx_posts_root_id_delete_at on posts  (cost=0.28..8.30 rows=1 width=216) (actual time=0.031..0.032 rows=0 loops=1)
               Index Cond: (((rootid)::text = 'qbr5gctu9iyg8c36hpcq6f3w8e'::text) AND (deleteat = 0))
               Filter: (updateat > '1623445795824'::bigint)
               Buffers: shared hit=2
 Planning:
   Buffers: shared hit=3
 Planning Time: 0.508 ms
 Execution Time: 0.106 ms
(14 rows)
```

We still get an index scan with index cond. Although there's a filter element, but atleast we get the whole thread with the index.
My thinking is that while the whole thread might be large, but after that, updates on a thread should be incremental.
Therefore, we should be okay without adding yet another index on the posts table.

This is just the first step in what could be potentially improved further.

1. We shouldn't even be loading the full thread always. But rather let the virtualized viewer
load more posts on demand.
2. If a post has been just reacted to, then we need not send the whole post down, but just the
reaction. This further saves bandwidth.

https://mattermost.atlassian.net/browse/MM-56548

TBD: Add load-test coverage to update the thread loading code

```release-note
NONE
```
---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-04-22 10:43:13 +05:30
Saturnino Abril
a35a6d7a3a
MM-63669 E2E/Playwright: Move "e2e-tests/playwright/test" to "e2e-tests/playwright" folder (#30647)
* move "e2e-tests/playwright/test" to  "e2e-tests/playwright/test" and expose "ensurePluginsLoaded"

* add test setup, and expose ensurePluginsLoaded and ensureServerDeployment to pw
2025-04-07 22:26:29 +08:00
Agniva De Sarker
7df4727353
[Aider assisted]: Use SelectBuilder and GetBuilder in webhook_store.go (#29555)
I was planning to kick off a campaign for this. But aider can do this just fine.

Starting off with a single file for now. But will slowly send more PRs with larger
commit diffs.

```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-12-11 12:03:03 +05:30
Mario Vitale
429c41747c
CLD-8395 Integrate playwright into E2E tests (#28492)
* Finalize Playwright E2E scripts integration, add videos
* Add suggestion by Saturn

Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
2024-10-09 13:05:11 +02:00
Antonis Stamatiou
34209ac72b
Change notice generation configuration file (#25526) 2023-11-27 13:07:12 +02:00
Ibrahim Serdar Acikgoz
83652aa3c2
[MM-53840] Add migration workflow (#24211) 2023-08-16 10:09:11 +03:00
Saturnino Abril
e377d985cd
MM-52641 MM-52645 Playwright/Accessibility: Initial setup and accessibility fix on login page (#23254)
* MM-52641 Playwright/Accessibility: initial setup

* upgrade Playwright to 1.36.1

* fix accessibility at login page

* fix lint

* update snapshot
2023-07-19 16:25:17 -04:00
Caleb Roseland
6da94c769c Merge branch 'master' into fix-boards-webapp-unit-tests 2023-03-29 09:37:24 -05:00
Mario Vitale
ba6b97fb62 Move /e2e -> /e2e-tests 2023-03-28 18:10:00 +02:00
Caleb Roseland
3940aa002d ignore junit.xml 2023-03-23 14:36:42 -05:00
Doug Lauder
c943ed6859
Mono repo -> Master (#22553)
Combines the following repositories into one:

https://github.com/mattermost/mattermost-server
https://github.com/mattermost/mattermost-webapp
https://github.com/mattermost/focalboard
https://github.com/mattermost/mattermost-plugin-playbooks
2023-03-22 17:22:27 -04:00
Doug Lauder
f4dcffd8d3
Additional Product APIs for Focalboard multi-product architecture (#20527)
* bump focalboard version; add services to product API

* add API to fetch logger

* import boards in same fashion as enterprise
2022-06-23 07:55:50 -04:00
Agniva De Sarker
38d0c2bcf3
MM-43753: Module workspaces (#20113)
* MM-43753: Module workspaces

Move to module workspaces

We make the following changes:
- Remove the vendor directory.
- Dynamically create the go.work file if it doesn't exist.
- Set the MM_SERVER_PATH for enterprise tests.

https://mattermost.atlassian.net/browse/MM-43753

```release-note
NONE
```

* Fix missing reference to MM_SERVER_PATH

```release-note
NONE
```

* Update test to add another nested dir

```release-note
NONE
```

* Have separate script to create go.work file

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-05 21:42:31 +05:30
Julien Tant
431a5fce59
load docker-compose.override.yaml when it exists (#19541) 2022-02-15 06:38:50 -07:00
Claudio Costa
9534f9fb62
Update schemas to include new indexes (#18313)
* Update schemas to include new indexes

* Increase local usability of gitlab scripts. (#18314)

* Increase local usability of gitlab scripts.

* Fix loading/saving SQL dumps

* Add logging to schema tests.

* Fix adding logs dir.

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

Co-authored-by: Elisabeth Kulzer <elikul@elikul.de>
2021-09-01 09:00:49 +02:00
Doug Lauder
02196e04fa
MM-27493 Shared channels (MVP) (#17301)
Remote Cluster Service
- provides ability for multiple Mattermost cluster instances to create a trusted connection with each other and exchange messages
- trusted connections are managed via slash commands (for now)
- facilitates features requiring inter-cluster communication, such as Shared Channels
Shared Channels Service
- provides ability to shared channels between one or more Mattermost cluster instances (using trusted connection)
- sharing/unsharing of channels is managed via slash commands (for now)
2021-04-01 13:44:56 -04:00
Max Erenberg
4699845c0a
Mm 29605 read permission s3 bucket (#16977)
Automatic Merge
2021-03-16 15:48:32 +01:00
Agniva De Sarker
091659c8ad
MM-31436: Upgrade dependencies (#16605)
* MM-31436: Upgrade dependencies

Ran make update-dependencies

https://mattermost.atlassian.net/browse/MM-31436

```release-note
NONE
```

* add missing dep

* fix lru marshaling
2021-01-07 14:39:17 +05:30
Christopher Speller
1aadd36644
MM-28859 Add feature flag managment system using split.io and remove viper. (#15954)
* Add feature flag managment system using split.io and remove viper.

* Fixing tests.

* Attempt to fix postgres tests.

* Fix watch filepath for advanced logging.

* Review fixes.

* Some error wrapping.

* Remove unessisary store interface.

* Desanitize SplitKey

* Simplify.

* Review feedback.

* Rename split mlog adatper to split logger.

* fsInner

* Style.

* Restore oldcfg test.

* Downgrading non-actionable feature flag errors to warnings.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-10-29 15:54:39 -07:00
Doug Lauder
7f64199a37
MM-27184 deprecate model.SetExpireInDays (#15165)
Mobile users were having their sessions unexpectedly expired, despite having ServiceSettings.ExtendSessionLengthWithActivity enabled. 

Every time a mobile app is opened it called `/api/v4/sessions/device` which calls attachDeviceId which calls `(*Session)SetExpireInDays`. This code above assumed the expiry should be relative to CreateAt which is incorrect when ExtendSessionLengthWithActivity is enabled. Therefore, every time the mobile app was opened, the maximum expiry was set in memory to CreateAt + session_length, even if the session was extended.

(*Session)SetExpireInDays is now deprecated and replaced with (*App)SetSessionExpireInDays which takes into account the ExtendSessionLengthWithActivity setting.
2020-08-04 16:10:37 -04:00
Jesús Espino
e980dd7bd3
Configurable dev environment (#14869)
* Configurable dev environment

* Add a bit of documentation

* fixing gofmt

* A bit more doc

* Using  variable

* Adding license header

* Moving LDAP_DATA variable to the default-config.mk file

* Adding another docker-compose for the makefile to not brake anybody workflow

* Moving dejavu to the config

* Fixing docker-compose.makefile.yaml for dejavu

* Adding keycloak support to the dev environment

* Address PR review comments

* Removing minio from default docker images

* Changing the default version of mysql to the oldest supported (5.6)

* Change the restart option to no for the dev environment

* Fixing restart option

* Reverting unneded changes

* Restoring 5.7 to check if test passes

* Going back to 5.6 mysql image

* Fixing tests on mysql 5.6

* Skipping flaky test

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2020-07-13 22:29:39 +02:00
Agniva De Sarker
d3156395a1
MM-25943: Upgrade dependencies for server (#14932)
* MM-25943: Upgrade dependencies for server

* tmp
2020-06-29 17:49:46 +05:30
Doug Lauder
e27b86cae0
expose ServiceSettings.ExtendSessionLengthWithActivity config to clients (#14516) 2020-05-13 12:31:43 -04:00
Martin Kraft
70e9647e85
MM-23646: Improve group sync performance. (#14171)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-04-21 15:55:30 -04:00
Agniva De Sarker
6f6793e579
MM-22782: Write fuzz testing for websockets (#14203)
* MM-22782: Write fuzz testing for websockets

* Moved to fuzz function

* incorporate review comments

* Remove some more comments
2020-04-07 14:41:55 +05:30
Agniva De Sarker
376ec9e0e3
Remove unnecessary struct2interface dependency (#13929)
* Remove unnecessary struct2interface dependency

Running go mod tidy on the repo removes it.
This was also preventing 1.14beta from running the repo,
because now it verifies modules.txt with go.mod, which had a mismatch.

* fixing CI

* Fix test-server target

* Fix some discrepancies in vendor

* Removing the Makefile target for now

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-02-27 09:46:13 +05:30
Eli Yukelzon
17523fa5d9
MM-21898 - Part 1: Generate and use an interface instead of *A… (#13840)
* Generate and use an interface instead of *App
2020-02-13 13:26:58 +01:00
Jesse Hallam
815e6b5956
.gitignore prepackaged_plugins and report.xml (#13765) 2020-01-27 12:46:26 -04:00
Elisabeth Kulzer
5eabfaac67
Add mm server bin directory (#13738)
* Add server bin directory needed for build process.
2020-01-23 12:34:29 +01:00
Agniva De Sarker
5123fe0292 Remove more instances of GOPATH from Makefile and CI (#13450)
Automatic Merge
2020-01-21 07:49:49 -05:00
Md Zubair Ahmed
57167f4c72 Fixes #13580 : notification.log should be ignored in the gitignore (#13581)
* added log to gitignore

* repeatative logs removed
2020-01-07 07:22:26 -08:00
Joram Wilander
a1882d4004 Ignore rolled log files (#8644) 2018-04-18 08:43:55 +01:00
Christian Claus
71be37d28f Add generated folder to .gitignore (#7714)
Add `app/data/*` to gitignore
2017-10-25 15:37:45 -04:00
Jonathan
adb2b1d6ed Ignored gogland project files (#7625) 2017-10-13 08:49:03 -07:00
Jonathan
1bf2a2e8d5 PLT-7641: Cleanup the jsonl files from make test (#7466)
* Disabled automatic log rotation to avoid multiple log file creation, added mattermost.log.jsonl files to gitignore

* Added log file delete to make clean
2017-09-25 15:02:41 -04:00
Christopher Speller
29fca51821
Renaming repo 2017-09-06 23:11:59 -07:00
Chris
1222e6cd41 make config.json play nicely with version control (#7221) 2017-08-20 23:47:14 -05:00
Chris
f80d50adbd PLT-7407: Back-end plugin mechanism (#7177)
* begin backend plugin wip

* flesh out rpcplugin. everything done except for minor supervisor stubs

* done with basic plugin infrastructure

* simplify tests

* remove unused test lines
2017-08-16 17:23:38 -05:00
Christopher Speller
9659a6da06 Stage 1 of caching layer. Framework (#6693) 2017-06-27 08:02:08 -07:00
Corey Hulen
36f216cb7c PLT-6080 moving clustering to memberlist (#6499)
* PLT-6080 adding cluster discovery service

* Adding memberlist lib

* Adding memberlist lib

* WIP

* WIP

* WIP

* WIP

* Rolling back config changes

* Fixing make file

* Fixing config for cluster

* WIP

* Fixing system console for clustering

* Fixing default config

* Fixing config

* Fixing system console for clustering

* Tweaking hub setting

* Bumping up time

* merging vendor dir

* Updating vendor dir

* Fixing unit test

* Fixing bad merge

* Remove some testing code

* Moving comment

* PLT-6868 adding db ping retry

* Removing unused loc strings

* Adding defer to cancel
2017-06-19 08:44:04 -07:00
Joram Wilander
ab67f6e257 PLT-6215 Major post list refactor (#6501)
* Major post list refactor

* Fix post and thread deletion

* Fix preferences not selecting correctly

* Fix military time displaying

* Fix UP key for editing posts

* Fix ESLint error

* Various fixes and updates per feedback

* Fix for permalink view

* Revert to old scrolling method and various fixes

* Add floating timestamp, new message indicator, scroll arrows

* Update post loading for focus mode and add visibility limit

* Fix pinning posts and a react warning

* Add loading UI updates from Asaad

* Fix refreshing loop

* Temporarily bump post visibility limit

* Update infinite scrolling

* Remove infinite scrolling
2017-06-18 14:42:32 -04:00
Harrison Healey
577ed27f1b PLT-6408 Framework for job server (#6404)
* Added initial job server

* Added job server to be ran as part of platform

* Added test job to the enterprise repo

* Fixed job server not loading license

* Renamed job package to jobs

* Fixed TE not being buildable

* Added JobStatus table to database

* Changed fields used by JobStatus

* Added APIs to query job status

* Added config change listener to server

* Added option to run job server from Makefile

* Added ability to enable/disable jobs from config

* Commented out placeholder for search indexing job

* Fixed govet

* Removed debug messages and fixed job api init message
2017-05-18 15:05:57 -04:00
Christopher Speller
2bbedd9def Updating client dependencies. Switching to yarn. (#6433)
* Updating client dependancies. Switching to using yarn.

* Updating React

* Moving pure components to using function syntax (performance gains with newer react version)

* Updating client dependancies.

* Ignore .yarninstall

* Enabling pre-lockfile because it's the entire point of using yarn.

* Removing old webpack config

* Moving to new prop-types

* Fixing ESLint Errors

* Updating jest snapshots.

* Cleaning up package.json
2017-05-18 09:28:18 -04:00
Corey Hulen
00bb479989 PLT-6090 adding ability to read license file from disk (#5895)
* PLT-6090 adding ability to read license file from disk

* Fixing unit test that fails only sometimes

* Fixing test that fails randomly
2017-03-31 09:54:30 -04:00
George Goldberg
7d449e0556 PLT-5755: Infrastructure for Component Testing. (#5814)
This migrates the existing webapp tests to using Jest and Enzyme. The
infrastructure is put in place for React component testing, and a few
simple example component tests are implemented.

This also adds snapshot testing of components, coverage checking for the
webapp (although that is not yet integrated to Coveralls), and the
ability to run npm run test:watch to automatically re-run affected tests
when working on the webapp codebase.
2017-03-23 14:05:36 -04:00
Christopher Speller
9298315ce9 Fxing code coverage numbers + APIv4 tests with EE (#5789) 2017-03-16 14:00:00 -07:00