Skip to content
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

Handle submitting multiple messages (cooccurrences) at once #379

Merged
merged 20 commits into from
Jan 9, 2024

Conversation

MrOrz
Copy link
Member

@MrOrz MrOrz commented Dec 27, 2023

Feature

This PR implements the items with yellow highlight.
We should probably ignore Items with red highlight in the future.

Implement askingCooccurrences handler and connect to processBatch

Refactors

Change askingArticleSubmissionConsent's input from Yes/No to an array of index

  • ranges from 0 ~ context.msgs.length - 1
  • indicates the context.msgs that does not in DB and is asking for user's consent for submission
  • If the user rejects, input of askingArticleSubmissionConsent is an empty array
  • updates snapshots of action inputs and related logic

Revamp logic of askingArticleSubmissionConsent

  • Before this PR, the handler only processes the first message in context.msgs
  • The new logic would
    1. submits multiple messages to database according to the input
    2. create UserArticleLink for newly created messages
      • For existing messages, the user article link will be created when the user selects the message in search results
    3. if multiple messages, set cooccurrences and show search results; otherwise, show creation results

Copy link
Member Author

MrOrz commented Dec 27, 2023

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@coveralls
Copy link

coveralls commented Dec 27, 2023

Pull Request Test Coverage Report for Build 7465454274

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-4.1%) to 87.795%

Totals Coverage Status
Change from base Build 7465452571: -4.1%
Covered Lines: 1027
Relevant Lines: 1129

💛 - Coveralls

Copy link
Member Author

MrOrz commented Jan 9, 2024

Merge activity

  • Jan 9, 1:38 PM: @MrOrz started a stack merge that includes this pull request via Graphite.
  • Jan 9, 1:39 PM: Graphite rebased this pull request as part of a merge.
  • Jan 9, 1:40 PM: @MrOrz merged this pull request with Graphite.

Base automatically changed from refactor-search-bubbles to master January 9, 2024 18:38
@MrOrz MrOrz merged commit 3f0b28c into master Jan 9, 2024
3 checks passed
@MrOrz MrOrz deleted the process-batch branch January 9, 2024 18:40
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.

None yet

3 participants