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

feat(ai-help): add parent short_title for duplicate source titles #428

Merged
merged 6 commits into from
Mar 1, 2024

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Feb 23, 2024

Distinguish sources with the same title by appending the parent page's short title.

(MP-671)

@caugner caugner requested a review from a team as a code owner February 23, 2024 15:44
@fiji-flo
Copy link
Contributor

See #431

In general my first thought was to solve this in the front-end and just pull the metadata.json for the results.

Did we think about just displaying the URL with in the link for duplicates? That would also make the a lot easier. And in this solution we could do two queries instead of a single complex one (as in only get the parent titles if we need them).

@caugner
Copy link
Contributor Author

caugner commented Feb 29, 2024

@fiji-flo

In general my first thought was to solve this in the front-end and just pull the metadata.json for the results.

Hm, interesting idea that I hadn't considered. I don't think this is significantly better. The pure front-end implementation is likely more complex than solving this in the backend, and it introduces a dependency on loading the metadata.json files, which either adds some delay (and the potential of an error) or adds the suffixes only after some delay.

Did we think about just displaying the URL with in the link for duplicates? That would also make the a lot easier. And in this solution we could do two queries instead of a single complex one (as in only get the parent titles if we need them).

I'm not quite sure what you mean. From a UX point of view, it's better to show the parent's title than the parent's slug, if that's what you mean. The SQL query isn't that complex and should be fast, since the mdn_url field has a unique index.

fiji-flo and others added 3 commits February 29, 2024 17:15
* feedback

* remove clone derive

* Update src/ai/embeddings.rs

---------

Co-authored-by: Claas Augner <495429+caugner@users.noreply.github.com>
@caugner
Copy link
Contributor Author

caugner commented Feb 29, 2024

FYI @fiji-flo I cannot re-request a review, since your comment isn't a review comment.

Copy link
Contributor

@argl argl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@caugner caugner merged commit f523d52 into main Mar 1, 2024
3 checks passed
@caugner caugner deleted the ai-help-duplicate-source-titles branch March 1, 2024 11:27
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