-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(lastViewAt): add recently view on company #15072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would have used isVirtualField: boolean
and then but the storage within the settings
JSONB
Because as discussed we will have virtual fields on Postgres storage
// Skip non-persisted redis-backed fields: company.lastViewedAt | ||
if ( | ||
flatObjectMetadata.standardId === STANDARD_OBJECT_IDS.company && | ||
flatFieldMetadata.standardId === COMPANY_STANDARD_FIELD_IDS.lastViewedAt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is temporary code and is already obvious for you, but this would need to be refactored into something more generic
}, [record, setRecordStore, loading]); | ||
|
||
useEffect(() => { | ||
eventTracker(AnalyticsType.TRACK, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -0,0 +1,5 @@ | |||
export const wrapperWithDoubleQuoteWhenUpperCase = (value: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we always add quotes? I know we don't add much comments in the codebase but maybe it's worth adding one here because it's not clear to me which we cannot always add quotes and get rid of this function entirely
…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.
No description provided.