Skip to content

feat(lastViewAt): add recently view on company - #15072

Closed
AMoreaux wants to merge 7 commits into
mainfrom
feat/add-recently-view
Closed

feat(lastViewAt): add recently view on company#15072
AMoreaux wants to merge 7 commits into
mainfrom
feat/add-recently-view

Conversation

@AMoreaux

Copy link
Copy Markdown
Contributor

No description provided.

… 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.
@AMoreaux
AMoreaux requested a review from FelixMalfait October 13, 2025 16:45
@AMoreaux AMoreaux self-assigned this Oct 13, 2025
@AMoreaux AMoreaux changed the title feat(): add recently view on company feat(lastViewAt): add recently view on company Oct 13, 2025
# 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.
@github-actions

github-actions Bot commented Oct 13, 2025

Copy link
Copy Markdown
Contributor

🚀 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',

@FelixMalfait FelixMalfait Oct 16, 2025

Copy link
Copy Markdown
Member

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 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, {

Copy link
Copy Markdown
Member

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

…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.
@github-actions

Copy link
Copy Markdown
Contributor

TODOs/FIXMEs:

  • // TODO: dirty. Avoid using replace on regex: packages/twenty-server/src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query.parser.ts

Generated by 🚫 dangerJS against a57c4f0

@Weiko

Weiko commented Oct 22, 2025

Copy link
Copy Markdown
Member

Let's reopen when you are back! 🙂

@Weiko Weiko closed this Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants