issue: ENG-8653
Details
Tested by commenting out isThreadThin check, and commenting out extractKeyserverIDFromIDOptional(messageInfo.threadID) check in getMessageSearchStoreOps. This allowed me to treat a thin thread as if it were thick, and execute local search on it.
Tested that the messages are fetched, ordered by timestamp descending. Tested that in thin threads (if the above hacks are removed) search works as before.
One thing that doesn’t work in thick threads is fetching next pages of results. This is because timestamps exceed cpp int, so SQLiteQueryExecutor::searchMessages doesn’t bind them to sql query correctly. Fixing this is tracked in ENG-8893
Diff Detail
- Repository
- rCOMM Comm
- Branch
- inka/search
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
One thing that doesn’t work in thick threads is fetching next pages of results. This is because timestamps exceed cpp int, so SQLiteQueryExecutor::searchMessages doesn’t bind them to sql query correctly. Fixing this is tracked in ENG-8893
Next diff fixes this
lib/actions/message-actions.js | ||
---|---|---|
477 | Can we use defaultNumberPerThread from lib/types/message-types.js? | |
507–513 | It's up to you, but this can be simplified | |
native/search/message-search.react.js | ||
49–50 | We could also use a single state variable with the whole message info | |
web/search/message-search-state-provider.react.js | ||
42–47 | Would it be simpler if we had a single state variable with the whole message info? |
lib/actions/message-actions.js | ||
---|---|---|
496 | This on purpose for safety, in general, we have a convention to pass numbers as strings to .wasm or native code to avoid issues with encoding on a different platforms |
lib/actions/message-actions.js | ||
---|---|---|
496 | Thank you for explaining! |
Address review
native/search/message-search.react.js | ||
---|---|---|
49–50 | I don't like that. They are being set in different places and we want memos to depend on them separately. So I feel like they should be separate |
lib/actions/message-actions.js | ||
---|---|---|
498 ↗ | (On Diff #42827) | Created D12965 to address |
lib/types/message-types.js | ||
697–698 ↗ | (On Diff #42827) | (This was discussed here) |
lib/types/message-types.js | ||
---|---|---|
697–698 ↗ | (On Diff #42827) | Thank you for explaining! |