feat(lastViewAt): add recently view on company - #15072
Conversation
… synchronization enhancements - Added `lastViewedAt` as a redis-backed field for better tracking user interactions with the `company` object. - Implemented Redis support in `workspace-select-query-builder` and supporting ORM logic (e.g., `redisFieldSqlFactory`, `redisFieldsDataSource`, `redisFieldRepository`). - Enhanced `graphql-query-parser` to compute redis-driven fields dynamically in listings. - Updated metadata cache to handle synthetic redis-backed metadata fields, avoiding duplication. - Extended test cases to validate new field integrations and behavior adjustments. - Refactored `redis-client.service` to support a no-eviction Redis client.
…lastViewedAt` storage in Redis - Introduced `OBJECT_RECORD_VIEWED_EVENT` for tracking object record views. - Optimized `lastViewedAt` field handling by removing legacy synthetic metadata injection. - Refactored frontend `RecordShowPage` with reusable `RecordShowContent` for enhanced component structure. - Enhanced Redis-backed field storage with accurate timestamp conversion logic.
# Conflicts: # packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query-order/graphql-query-order.parser.ts # packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-many-resolver.service.ts
…t parameters - Corrected indentation issues in `graphql-query-find-many-resolver.service.ts` for better readability. - Removed unused boolean parameters in `graphql-query.parser.spec.ts` to maintain cleaner tests.
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:47580 This environment will automatically shut down when the PR is closed or after 5 hours. |
# Conflicts: # packages/twenty-front/src/pages/object-record/RecordShowPage.tsx # packages/twenty-server/src/engine/api/graphql/graphql-query-runner/resolvers/graphql-query-find-many-resolver.service.ts
| settings: { | ||
| displayFormat: DateDisplayFormat.RELATIVE, | ||
| }, | ||
| storage: 'redis', |
There was a problem hiding this comment.
I think I would have used isVirtualField: boolean and then put the storage within the settings JSONB
Because as discussed we will have virtual fields on Postgres storage
| }, [record, setRecordStore, loading]); | ||
|
|
||
| useEffect(() => { | ||
| eventTracker(AnalyticsType.TRACK, { |
There was a problem hiding this comment.
We already track pageviews, can't we infer it from that or do something smarter rather than send 2 extremely similar track events?
We could either stop tracking unstructured pageviews and only store events like that ; or we could eventually let the endpoint support an array and send 2 events at once...? I think I prefer solution 1
…nhance GraphQL query parsing - Removed unused `RecordShowContent` component to streamline frontend logic. - Improved GraphQL query parser by replacing `orderBy` logic with more extensible `addOrderBy` handling. - Added support for external storage aliasing in order-by conditions for better compatibility with composite fields.
|
Let's reopen when you are back! 🙂 |
No description provided.