[$4000] mWeb - Copy to email/URL is not working correctly - reported by @mateusbra

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Issue was found when executing #8195
Action Performed:

Log in on New Expensify.
Open a report.
Type an URL and an e-mail on chat.

Expected Result:
The message "Copy e-mail to clipboard" displayed when you try to copy an email and "copy URL to clipboard" tapping URL
Actual Result:
The message "Copy to clipboard" displayed when you try to copy an email. Sometimes it shows as regular context menu
Workaround:
Unknown
Platform:

Where is this issue occurring?

Mobile Web

Version Number: 1.1.46-0
Reproducible in staging?:  y
Reproducible in production?: y (New feature)
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
https://user-images.githubusercontent.com/43996225/160028142-3fe96a20-6e66-4605-ae2a-618bc322f957.mp4
https://user-images.githubusercontent.com/43996225/160028204-1fe2a591-3466-430e-9802-147d0baa43ee.mp4
Expensify/Expensify Issue URL:
Issue reported by: Reported by @mateusbra https://expensify.slack.com/archives/C01GTK53T8Q/p1647474115298459
Slack conversation:
View all open jobs on GitHub
Issue was found when executing #8195
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01a8294a9c054ef83d
Upwork Job ID:<PHONE_NUMBER>112300544

@kavimuru I found this issue while working on https://github.com/Expensify/App/pull/8195 and reported on slack here: https://app.slack.com/client/T03SC9DTT/C01GTK53T8Q does that count for reporting bounty?

@mateusbra  I don't have access to the slack. But as per this comment, https://github.com/Expensify/App/pull/8195#issuecomment-1070240184 yes. Also tester can repro this bug too https://github.com/Expensify/App/issues/8006#issuecomment-1069334038

Opening this up!

This should stay daily priority

@mateusbra do you have interest in working on this one sice you discovered it?
@kavimuru can you please make sure we at the "@ reported by" to a GH title if they are due the bug reporting bounty? Seems applicable in this case for @mateusbra.

Posted job to Upwork;
Internal job - https://www.upwork.com/ab/applicants/1508625903649284096/job-details
External job - https://www.upwork.com/jobs/~01bd32eda238a19082

Hi,
This is Zamar from Upwork.com
I will fix the issue by implementing URL parsing feature in ContextMenuAction.
Now there is no checking parts for url/email when the context menu is shown.
So there will be a validation for the clipboard text, which will check if it is an email address or an url; and switch the caption of the menu item according to the result.
Thank you.

I don't see how this is different from https://github.com/Expensify/App/issues/8006. This should have been fixed on https://github.com/Expensify/App/issues/8311. cc: @Santhosh-Sellavel.
why do we need a different issue?

@parasharrajat
#8195  - addresses the issue where clicking on an email in the message showed the copy URL option instead of copy email.
https://github.com/Expensify/App/issues/8311  - But the existing copy URL itself not working on mWeb at all.

Not overdue, waiting for proposals.

I'm going to be ooo until April 26th so I'm going to assign a new CM to this issue. Thank you!

Price increase to $500
waiting on prosposals...

Root cause:
When we long press on an email/link, BaseAnchorForCommentsOnly's onSecondaryInteraction is fired, calling ReportActionContextMenu.showContextMenu with a corresponding type (CONTEXT_MENU_TYPES.EMAIL or CONTEXT_MENU_TYPES.LINK).
Howewer, since BaseAnchorForCommentsOnly is wrapped inside a second PressableWithSecondaryInteraction on ReportActionItem page, it's showPopover method is also fired, calling ReportActionContextMenu.showContextMenu with a CONTEXT_MENU_TYPES.REPORT_ACTION type.
So, in short, when we long press, ReportActionContextMenu.showContextMenu is called with the right type and then almost instantly it gets called with the wrong type, which results in the wrong context menu being shown.
Proposal:
Throttle showContextMenu method, so the second call get's omitted.
  showContextMenu = _.throttle((
      type,
      event,
      selection,
      contextMenuAnchor,
      reportID,
      reportAction,
      draftMessage,
      onShow = () => {},
      onHide = () => {},
  ) => {
      const nativeEvent = event.nativeEvent || {};
      this.contextMenuAnchor = contextMenuAnchor;

      // Singleton behaviour of ContextMenu creates race conditions when user requests multiple contextMenus.
      // But it is possible that every new request registers new callbacks thus instanceID is used to corelate those callbacks
      this.instanceID = Math.random().toString(36).substr(2, 5);

      // Register the onHide callback only when Popover is shown to remove the race conditions when there are mutltiple popover open requests
      this.onPopoverShow = () => {
          onShow();
          this.onPopoverHide = onHide;
      };
      this.getContextMenuMeasuredLocation().then(({x, y}) => {
          this.setState({
              cursorRelativePosition: {
                  horizontal: nativeEvent.pageX - x,
                  vertical: nativeEvent.pageY - y,
              },
              popoverAnchorPosition: {
                  horizontal: nativeEvent.pageX,
                  vertical: nativeEvent.pageY,
              },
              type,
              reportID,
              reportAction,
              selection,
              isPopoverVisible: true,
              reportActionDraftMessage: draftMessage,
          });
      });
  }, 100, {trailing: false})

Result:
Chrome on Android
https://user-images.githubusercontent.com/9059945/163683498-971dc82d-ae30-49a4-93df-ae03d8673527.mp4
Safari on iOS
https://user-images.githubusercontent.com/9059945/163683471-88facc87-5664-4af5-b166-934eddc856e3.mp4

Root cause seems correct but I don't like the proposal.

Root cause seems correct but I don't like the proposal.

I've found a simpler fix:
The issue arises because in PressableWithSecondaryInteraction/index.js, we have a LongPressGestureHandler, which wraps Pressable, so essentially links are wrapped like this:
<LongPressGestureHandler>
  <Pressable>
    <LongPressGestureHandler>
      <Pressable>
        <TextOfTheLink>
      </Pressable>
    </LongPressGestureHandler>
  </Pressable>
</LongPressGestureHandler>

To fix this, we need to:

Add longPressGestureHandlerEnabled={false} to this line on ReportActionItem (prop probably needs a better name)
Change this line to if (e.nativeEvent.state !== State.ACTIVE || !this.props.longPressGestureHandlerEnabled) {

To be honest, I'm not entirely sure why it works, but it does
https://user-images.githubusercontent.com/9059945/163777528-d0ace458-b6e2-40f8-91c7-534dce3f4870.mp4

Ok. What is the base of this solution? Why do you think we should/have to do this?
The proposal is still lacking the proper explanation of Why the solution?

Ok. What is the base of this solution? Why do you think we should/have to do this?
The proposal is still lacking the proper explanation of Why the solution?

Case 1: user long presses on a comment: LongPressGestureHandler's onHandlerStateChange fires, which in turn calls onSecondaryInteraction={this.showPopover}
Case 2: user long presses on a link inside the comment: LongPressGestureHandler's onHandlerStateChange fires, which in turn calls onSecondaryInteraction={(e) => ReportActionContextMenu.showContextMenu()}.
But, since in this case we have one LongPressGestureHandler's nested inside another one, both of their onHandlerStateChange events are fired, one on BaseAnchorForCommentsOnly/index.js  (the right one) and one from ReportActionItem.js (the wrong one).
Adding longPressGestureHandlerEnabled={false} will essentially disable parent's onHandlerStateChange in case it's child has already fired onHandlerStateChange.

I understood the root cause. I got your solution and how this works. But what I am asking is why your solution(Workaround)?
Why do you think we should do either of your changes? Is there any systematic way of preventing event bubbling?

I think there is a better solution. I will wait to see that proposal before making the choice.

I understood the root cause. I got your solution and how this works. But what I am asking is why your solution(Workaround)?
Why do you think we should do either of your changes? Is there any systematic way of preventing event bubbling?

Got it, sorry for the misunderstanding.
I'll try to find a more universal approach a bit later

Not overdue, waiting for proposals.

Price increased.

Proposal
Reason
When we tap the email address, the inner PressableWithSecondaryInteraction component fire an event, in the event handler we call ReportActionContextMenu.showContextMenu() with type 'EMAIL':
https://github.com/Expensify/App/blob/4c64bec3f38af925a01911155eab54feafc96cda/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly/index.js#L64-L76
And the outer PressableWithSecondaryInteraction component also fire an event after that, in the event handler we call ReportActionContextMenu.showContextMenu() with type 'REPORT_ACTION':
https://github.com/Expensify/App/blob/4c64bec3f38af925a01911155eab54feafc96cda/src/pages/home/report/ReportActionItem.js#L99-L115
The outer component toggle the modal popover with regular context menu 'Copy to clipboard', so we can't see the context menu 'Copy e-mail to clipboard'.
Solution 1
Since the inner PressableWithSecondaryInteraction already toggle the modal popover, and isPopoverVisible property stored in PopoverReportActionContextMenu's state, we can check isPopoverVisible is true in showContextMenu function, if it's true, do nothing and return.
https://github.com/Expensify/App/blob/68f0bbf9c7fe8a95c7d65b0a9153229375863d1e/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js#L114-L124
+       if (this.state.isPopoverVisible) return;
https://github.com/Expensify/App/blob/68f0bbf9c7fe8a95c7d65b0a9153229375863d1e/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js#L125-L126

Hmm! I strongly recommend looking back at the previous discussion. I asked

Why do you think we should do either of your changes? Is there any systematic way of preventing event bubbling?

@b1tjoy your proposal looks hacky to me.

Price increased.

Proposal for mWeb:

This is not a problem with the Expensify App, it's an inconsistency of react-native-gesture-handler. This is a minimal reproduction snack, running it on web you can see that when longpressing on text, two console statements appear, while there's should be only one ('pressed 2')
Since issue is occuring only on mWeb, we're interested in  PressableWithSecondaryInteraction/index.js file.
LongPressGestureHandler was added to this file in this PR, which resolved #7462. However, #7462 was occuring only on native platforms, longpressing on images worked fine on mWeb.
That means, we can remove LongPressGestureHandler from  PressableWithSecondaryInteraction/index.js and add onLongPress listener to Pressable:

onLongPress={this.callSecondaryInteractionWithMappedEvent}

https://user-images.githubusercontent.com/9059945/166672914-0de59ede-13f4-46db-97be-91b745f74f54.mp4
This resolves the current issue and doesn't break the #7462
But
While testing this on other platforms i found a similar issue on iOS, which is similar to this, has different root cause, but still caused by LongPressGestureHandler. Pressing on plain link works fine on iOS, but then you have a message that contains text and link, regular context menu is displayed
https://user-images.githubusercontent.com/9059945/166672883-57751255-0649-41df-81b9-43ac39b65ea3.mov
But the cause is different from web, where both LongPressGestureHandler listeners are called, on iOS only the parent's listener get's called. However, i'm not sure this is not a fluke of dev mode/simulator, since I'm getting mixed results when testing this (sometimes it works as expected, sometimes it doesn't) and when running snack on iOS, i'm also getting random results.
Can someone plese check if this issue present when runnig production build on physical iOS device?

Thanks for the updated proposal @eVoloshchak. Seems to me the best proposal so far but let's discuss the iOS issue you mentioned first. Unfortunately, I don't have iOS. Let's see who can help us here to test it.

I tested it on your snack but I also found the same issue. After some digging, I found out that iOS handle events differently, and all the handlers are triggered simultaneously when touches are overlapping. https://github.com/software-mansion/react-native-gesture-handler/issues/1930#issuecomment-1068920275.
They suggest using https://docs.swmansion.com/react-native-gesture-handler/docs/gesture-composition/#simultaneous. I don't know how they can be used.
Let me know if you find something.

I found out that iOS handle events differently, and all the handlers are triggered simultaneously when touches are overlapping. software-mansion/react-native-gesture-handler#1930 (comment).
They suggest using https://docs.swmansion.com/react-native-gesture-handler/docs/gesture-composition/#simultaneous. I don't know how they can be used.

@parasharrajat , this is a great find actually, I was lookig for something like this, but never managed to find it.
But we can't use this in our scenario (at least I couldn't figure out a way to).
Besides, as it turns out, this is not iOS specific, this problem is also present on Android (the issue description should probably be updated). Same as with iOS, wrong context menu is displayed when we have a message with link and text.
https://user-images.githubusercontent.com/9059945/167257217-cbb1fb21-7723-4f77-bd3f-e996a0aaac8b.mp4
I've recreated out setup in this snack, you can see, that no matter where you long press, only the parent handler registers the touch. And this is not a problem with nested gesture handlers either. Even if you delete the parent handler (const App, line 18), the handler in AnchorRenderer doesn't get called. It starts working if you wrap Text into View in AnchorRenderer, but i'm guessing that would break #4911.
But as this is the case with mWeb, we can look into why LongPressHandler was added in the first place.
As I mentioned previuosly, it was added to fix  https://github.com/Expensify/App/issues/7462.
So actually, we need LongPressHandler only for messages with attachments, not for all the messages.
That means we can:

Add an isAttachment method to ReportActionItem.js

isAttachment() {
    const message = _.last(lodashGet(this.props.action, 'message', [{}]));
    const isAttachment = _.has(this.props.action, 'isAttachment')
        ? this.props.action.isAttachment
        : ReportUtils.isReportMessageAttachment(message);

    return isAttachment;
}

Then pass it to PressableWithSecondaryInteraction here

useLongPressHandler={this.isAttachment()}

And in PressableWithSecondaryInteraction/index.native.js use LongPressHandler only for attachments

const PressableWithSecondaryInteraction = (props) => {
    // Use Text node for inline mode to prevent content overflow.
    const Node = props.inline ? Text : Pressable;
    if (props.useLongPressHandler) {
        return (
            <LongPressGestureHandler
                onHandlerStateChange={(e) => {
                    if (e.nativeEvent.state !== State.ACTIVE) {
                        return;
                    }
                    e.preventDefault();
                    HapticFeedback.trigger();
                    props.onSecondaryInteraction(e);
                }}
            >
                <Node
                    ref={props.forwardedRef}
                    onPress={props.onPress}
                    onPressIn={props.onPressIn}
                    onPressOut={props.onPressOut}
                // eslint-disable-next-line react/jsx-props-no-spreading
                    {...(_.omit(props, 'onLongPress'))}
                >
                    {props.children}
                </Node>
            </LongPressGestureHandler>
        );
    }

    return (
        <Node
            ref={props.forwardedRef}
            onPress={props.onPress}
            onPressIn={props.onPressIn}
            onPressOut={props.onPressOut}
            onLongPress={(e) => {
                e.preventDefault();
                HapticFeedback.trigger();
                props.onSecondaryInteraction(e);
            }}
        // eslint-disable-next-line react/jsx-props-no-spreading
            {...props}
        >
            {props.children}
        </Node>
    )
};

Android:
https://user-images.githubusercontent.com/9059945/167259600-8c55bf45-df90-4c3f-a40d-a9a636114c8d.mp4
iOS:
https://user-images.githubusercontent.com/9059945/167259617-e988c14f-a35d-4901-bbe3-26584e4d8fe2.mov

Looking now.

@eVoloshchak this proposals somewhat match with the approach from the previous proposal.  This is doable but I don't think it would be much helpful. It is limited to this scenario only. If we are about to make any change it can break.
What if we manage the nested handlers. I have a few crazy ideas.

Utilize this https://docs.swmansion.com/react-native-gesture-handler/docs/2.0.0/gesture-handlers/basics/interactions#simultaneous-recognition.

Or create event bubbling.

We create a component that creates a LongPressGestureHandler around the children.

This component will save the ref with a nesting level in the Context.

Context value can be Array<{ref: Ref, level: Number}>. we will push each instance on the context value.

Now as soon as any handler's gesture is activated, we bubble the event to each handler. It can be done via updating the contextValue and setting active true one by one based on level {ref: Ref, level: Number, active: Boolean}.

Updating the Context will trigger an update on each component from step one.

We can also cancel the event at any level. We just need to prevent bubbling.

What do you say? This will allow us to use this anywhere in the app.

What do you say? This will allow us to use this anywhere in the app.

Sounds fun :) I'll try to implement this, will come back with results in ~3 days

I am not saying that it is the way but thought of sharing.

@parasharrajat , just realised this is not gonna work, since the issue isn't with nested gesture handlers.
Take a look at this snack, it has only one LongPressGestureHandler, but still doesn't work.
However, if we take the same snack, but wrap our url Text with View, it starts working - snack.
I'll try to look into why wrapping View with LongPressGestureHandler, but wrapping Text doesn't

Not overdue, waiting for proposals.

I will open a slack discussion to discuss existing proposals. But this is still open for better proposals.

@parasharrajat are we still waiting?

Yeah, I will open the discussion soon. Need to summarize the discussion. But I open to proposals.

I will open the discussion on slack shortly...

I will open the discussion on slack shortly...

Hi @parasharrajat! :) any update on this?

Raised https://expensify.slack.com/archives/C01GTK53T8Q/p1656349294099259.

Responding in the thread

Proposal
it's a small problem and does not need all these changes.
Problem
the 2 events trigger ( long-press on link, long-press on the comment)
the link event first and then the comment event.
and both contextMenu is show at the same time but the second one will override the first one

Solution :
just prevent event default on the first long press  (that will be the child )
we already do this on native and that is why it works on native.
https://github.com/Expensify/App/blob/ce899227ca6d3823e2865a5e194b429f1263db30/src/components/PressableWithSecondaryInteraction/index.native.js#L24
changes :
on
https://github.com/Expensify/App/blob/ce899227ca6d3823e2865a5e194b429f1263db30/src/components/PressableWithSecondaryInteraction/index.js#L38
    callSecondaryInteractionWithMappedEvent(e) {
        if ((e.nativeEvent.state !== State.ACTIVE) || hasHoverSupport()) {
            return;
        }
+        e.preventDefault();

     ...
       }

Result :
https://user-images.githubusercontent.com/21364901/179004902-7fe25915-c68f-491c-80d9-04fb93369ea1.mov
cc : @parasharrajat

Not overdue, we have a new proposal  to be reviewed.

Does not work on Native and this issue also exists on native.
https://user-images.githubusercontent.com/24370807/179632298-2d72fca9-4eee-4055-9fda-599a3d11e344.mp4

yes, this proposal for web only because the issue says it's mWeb.

Where is this issue occurring?
Mobile Web

on native, it's another root cause but I think it is worth bouns.
any way.
proposal  ( for native)
the root cause is the child of LongPressGestureHandler  is a text .
and it need a container for it so we can use view or pressable and that will work
as we use text component for aligning we will have issues with aligning but we can solve it by cauterizing comment rendering.
changes :
https://github.com/Expensify/App/blob/6369e8e3136b95e03205c5bde751028734600071/src/components/PressableWithSecondaryInteraction/index.native.js#L29
replace node with pressable
        <Pressable
            ref={props.forwardedRef}
            onPress={props.onPress}
            onPressIn={props.onPressIn}
            onPressOut={props.onPressOut}
            // eslint-disable-next-line react/jsx-props-no-spreading
            {...(_.omit(props, 'onLongPress'))}
        >
            {props.children}
        </Pressable>

this change will make links work fine on native but the text algin will need more work.
I fix it by customizing the comment rendered on HTML engine
and wrap comment children on view with alginContent center.
const CommentRender = props => (
    <View style={{alignContent: 'center', flexDirection: 'row'}}>
        { _.map(props.tnode.children, node => (<TNodeChildrenRenderer tnode={node} />))}
    </View>
);

also, there is some additional point that makes link better clicking by increase the maxDix to 20 (improve only)
    <LongPressGestureHandler
...
        maxDist={20}
    >
...

full changes are here  https://github.com/ahmdshrif/App/compare/main...ahmdshrif:App:fix/link-longpress ( i include support for multiLine comment also here  )
cc: @parasharrajat  @marcochavezf.

I agree issue details are incomplete but many times it is case that only a single platform is mentioned but all issues need the be fixed on all platforms.
As the same issue occur on native too, it needs the be fixed as well.
At this time, scope of the issue is not extended so I don't see a bonus but it can be.
@kavimuru could you please add Android and iOS platform as well?

On my android device production app (v1.1.79-17), it sometime works and sometime does not work.
cc: @parasharrajat @ahmdshrif

On my android device production app (v1.1.79-17), it sometime works and sometime does not work.
cc: @parasharrajat @ahmdshrif

@ahmdshrif Could you please only suggest changes that are necessary to fix this issue in your proposal?

Change LongPressGestureHandler to Pressable.

Also, if you look back the history, you made this change to allow propagation of long press for Attachments. (Don't remember exactly but you can find it) so that should not break.
I do not understand the purpose of CommentRender. What is going on here and why? I don't HTML manipulation is necessary for this issue at all.
   const nodes = props.tnode.children[0].children;
    _.map(nodes, (node) => {
        if (node.tagName !== 'br') {
            currentLine.push(node);
            return;
        }
        lines.push(currentLine);
        currentLine = [];
    });
    if (currentLine.length > 0) {
        lines.push(currentLine);
    }

@parasharrajat  yes I remember my change and I don't break it.
the simple proposal for test is this change in PressableWithSecondaryInteraction/index.native.js
  <LongPressGestureHandler
        onHandlerStateChange={(e) => {
            if (e.nativeEvent.state !== State.ACTIVE) {
                return;
            }
            e.preventDefault();
            HapticFeedback.trigger();
            props.onSecondaryInteraction(e);
        }}
        maxDist={20}
        minDurationMs={props.inline ? 400 : 500}
    >
        <Pressable
            ref={props.forwardedRef}
            onPress={props.onPress}
            onPressIn={props.onPressIn}
            onPressOut={props.onPressOut}
            // eslint-disable-next-line react/jsx-props-no-spreading
            {...(_.omit(props, 'onLongPress'))}
        >
            {props.children}
        </Pressable>
    </LongPressGestureHandler>

and  in
PressableWithSecondaryInteraction/index..js
  callSecondaryInteractionWithMappedEvent(e) {
        if ((e.nativeEvent.state !== State.ACTIVE) || hasHoverSupport()) {
            return;
        }
        e.preventDefault();

     ...
       }

this will break the text alignment (as you see in screenshots)  so other code to fix this alignment.   I can explain more about how it work but for now, let's get confirmation about the main fix for long-press.

Reposted since the job closed https://www.upwork.com/jobs/~0106b378e281080b23

PROPOSAL
Problem
We use LongPressGestureHandler to replace Pressable in PR https://github.com/Expensify/App/pull/8018, and this PR fix https://github.com/Expensify/App/issues/7462. In that issue, long press on image doesn't open the context menu, but act like short press and open image thumbnail. If we fix issue 7462 with a solution which does not replace Pressable with LongPressGestureHandler, our current issue will be fixed too.
The root cause of issue 7462 is the inner TouchableWithoutFocus's onPress handler conflicts with outer Pressable onLongPress handler, they both use react-native Gesture Responder System, and they can not coordinate with each other.
Solution
If we use RNGH's TapGestureHandler to replace TouchableOpacity, and revert PR https://github.com/Expensify/App/pull/8018, both https://github.com/Expensify/App/issues/7462 and https://github.com/Expensify/App/issues/8311 will be fixed. Because RNGH does not use Gesture Responder System of react-native, press and long press can work with each other.
Here is the solution:

Revert changes made by PR https://github.com/Expensify/App/pull/8018
Use TapGestureHandler in TouchableWithoutFocus.js as the following code

Replace
https://github.com/Expensify/App/blob/03b953404d3fc17d03fc5635322f4e12c25afb7b/src/components/TouchableWithoutFocus.js#L39-L41
With
<TapGestureHandler
  onHandlerStateChange={(event) => {
    if (event.nativeEvent.state === State.ACTIVE) {
      this.touchableRef.blur();
      this.props.onPress();
    }
  }}
>
  <View ref={el => this.touchableRef = el} style={this.props.styles}>
    {this.props.children}
  </View>
</TapGestureHandler>

Since PR https://github.com/Expensify/App/pull/8018 was merged in 1.1.43-0, I use tag 1.1.42-6 in our repo above to verify the solution. I will post a complete proposal based on main repo later.
Screenshot
The screenshot was also taken with tag 1.1.42-6 to demonstrate the solution can fix both issues, will update with new screenshot later.
https://user-images.githubusercontent.com/103875612/182896277-acdd24ac-a956-452d-9558-a6ec26876776.mp4

UPDATE
This is a update of proposal https://github.com/Expensify/App/issues/8311#issuecomment-1205476421, change the solution code based on the latest main branch.
PROPOSAL
Problem
We use LongPressGestureHandler to replace Pressable in PR https://github.com/Expensify/App/pull/8018, and this PR fix https://github.com/Expensify/App/issues/7462. In that issue, long press on image doesn't open the context menu, but act like short press and open image thumbnail. If we fix issue 7462 with a solution which does not replace Pressable with LongPressGestureHandler, our current issue will be fixed too.
The root cause of issue 7462 is the inner PressableWithoutFocus's onPress handler conflicts with outer Pressable onLongPress handler, they both use react-native Gesture Responder System, and they can not coordinate with each other.
Solution
If we revert PR https://github.com/Expensify/App/pull/8018, and use RNGH's TapGestureHandler to replace Pressable, both https://github.com/Expensify/App/issues/7462 and https://github.com/Expensify/App/issues/8311 will be fixed. Because RNGH does not use Gesture Responder System of react-native, inner press handler and outer long press handler can work with each other.

Revert PR https://github.com/Expensify/App/pull/8018

https://github.com/Expensify/App/blob/97eb8bb0019068b484035a17a64e4ecdeb147092/src/components/PressableWithSecondaryInteraction/index.js
diff --git a/src/components/PressableWithSecondaryInteraction/index.js b/src/components/PressableWithSecondaryInteraction/index.js
index a6b21a59e..78168a9f4 100644
--- a/src/components/PressableWithSecondaryInteraction/index.js
+++ b/src/components/PressableWithSecondaryInteraction/index.js
@@ -1,7 +1,6 @@
 import _ from 'underscore';
 import React, {Component} from 'react';
 import {Pressable} from 'react-native';
-import {LongPressGestureHandler, State} from 'react-native-gesture-handler';
 import * as pressableWithSecondaryInteractionPropTypes from './pressableWithSecondaryInteractionPropTypes';
 import styles from '../../styles/styles';
 import hasHoverSupport from '../../libs/hasHoverSupport';
@@ -12,7 +11,6 @@ import hasHoverSupport from '../../libs/hasHoverSupport';
 class PressableWithSecondaryInteraction extends Component {
     constructor(props) {
         super(props);
-        this.callSecondaryInteractionWithMappedEvent = this.callSecondaryInteractionWithMappedEvent.bind(this);
         this.executeSecondaryInteractionOnContextMenu = this.executeSecondaryInteractionOnContextMenu.bind(this);
     }

@@ -27,27 +25,6 @@ class PressableWithSecondaryInteraction extends Component {
         this.pressableRef.removeEventListener('contextmenu', this.executeSecondaryInteractionOnContextMenu);
     }

-    /**
-     * @param {Object} e
-     */
-    callSecondaryInteractionWithMappedEvent(e) {
-        if ((e.nativeEvent.state !== State.ACTIVE) || hasHoverSupport()) {
-            return;
-        }
-
-        // Map gesture event to normal Responder event
-        const {
-            absoluteX, absoluteY, locationX, locationY,
-        } = e.nativeEvent;
-        const mapEvent = {
-            ...e,
-            nativeEvent: {
-                ...e.nativeEvent, pageX: absoluteX, pageY: absoluteY, x: locationX, y: locationY,
-            },
-        };
-        this.props.onSecondaryInteraction(mapEvent);
-    }
-
     /**
      * @param {contextmenu} e - A right-click MouseEvent.
      * https://developer.mozilla.org/en-US/docs/Web/API/Element/contextmenu_event
@@ -65,19 +42,23 @@ class PressableWithSecondaryInteraction extends Component {

         // On Web, Text does not support LongPress events thus manage inline mode with styling instead of using Text.
         return (
-            <LongPressGestureHandler onHandlerStateChange={this.callSecondaryInteractionWithMappedEvent}>
-                <Pressable
-                    style={this.props.inline && styles.dInline}
-                    onPressIn={this.props.onPressIn}
-                    onPressOut={this.props.onPressOut}
-                    onPress={this.props.onPress}
-                    ref={el => this.pressableRef = el}
-                    // eslint-disable-next-line react/jsx-props-no-spreading
-                    {...defaultPressableProps}
-                >
-                    {this.props.children}
-                </Pressable>
-            </LongPressGestureHandler>
+            <Pressable
+                style={this.props.inline && styles.dInline}
+                onPressIn={this.props.onPressIn}
+                onLongPress={(e) => {
+                    if (hasHoverSupport()) {
+                        return;
+                    }
+                    this.props.onSecondaryInteraction(e);
+                }}
+                onPressOut={this.props.onPressOut}
+                onPress={this.props.onPress}
+                ref={el => this.pressableRef = el}
+                // eslint-disable-next-line react/jsx-props-no-spreading
+                {...defaultPressableProps}
+            >
+                {this.props.children}
+            </Pressable>
         );
     }
 }

https://github.com/Expensify/App/blob/main/src/components/PressableWithSecondaryInteraction/index.native.js
diff --git a/src/components/PressableWithSecondaryInteraction/index.native.js b/src/components/PressableWithSecondaryInteraction/index.native.js
index efb68e52e..8c6c145cc 100644
--- a/src/components/PressableWithSecondaryInteraction/index.native.js
+++ b/src/components/PressableWithSecondaryInteraction/index.native.js
@@ -1,7 +1,6 @@
 import _ from 'underscore';
 import React, {forwardRef} from 'react';
 import {Pressable} from 'react-native';
-import {LongPressGestureHandler, State} from 'react-native-gesture-handler';
 import * as pressableWithSecondaryInteractionPropTypes from './pressableWithSecondaryInteractionPropTypes';
 import Text from '../Text';
 import HapticFeedback from '../../libs/HapticFeedback';
@@ -16,28 +15,21 @@ const PressableWithSecondaryInteraction = (props) => {
     // Use Text node for inline mode to prevent content overflow.
     const Node = props.inline ? Text : Pressable;
     return (
-        <LongPressGestureHandler
-            onHandlerStateChange={(e) => {
-                if (e.nativeEvent.state !== State.ACTIVE) {
-                    return;
-                }
+        <Node
+            ref={props.forwardedRef}
+            onPress={props.onPress}
+            onPressIn={props.onPressIn}
+            onLongPress={(e) => {
                 e.preventDefault();
                 HapticFeedback.trigger();
                 props.onSecondaryInteraction(e);
             }}
+            onPressOut={props.onPressOut}
+        // eslint-disable-next-line react/jsx-props-no-spreading
+            {...(_.omit(props, 'onLongPress'))}
         >
-            <Node
-                ref={props.forwardedRef}
-                onPress={props.onPress}
-                onPressIn={props.onPressIn}
-                onPressOut={props.onPressOut}
-            // eslint-disable-next-line react/jsx-props-no-spreading
-                {...(_.omit(props, 'onLongPress'))}
-            >
-                {props.children}
-            </Node>
-        </LongPressGestureHandler>
-
+            {props.children}
+        </Node>
     );
 };

Use TapGestureHandler to handle press event in https://github.com/Expensify/App/blob/main/src/components/PressableWithoutFocus.js

diff --git a/src/components/PressableWithoutFocus.js b/src/components/PressableWithoutFocus.js
index 35a9cce99..87cf6eb1c 100644
--- a/src/components/PressableWithoutFocus.js
+++ b/src/components/PressableWithoutFocus.js
@@ -1,6 +1,7 @@
 import React from 'react';
-import {Pressable} from 'react-native';
+import {View} from 'react-native';
 import PropTypes from 'prop-types';
+import {State, TapGestureHandler} from 'react-native-gesture-handler';

 const propTypes = {
     /** Element that should be clickable  */
@@ -33,16 +34,21 @@ class PressableWithoutFocus extends React.Component {
         this.pressAndBlur = this.pressAndBlur.bind(this);
     }

-    pressAndBlur() {
+    pressAndBlur(event) {
+        if (event.nativeEvent.state !== State.ACTIVE) {
+            return;
+        }
         this.pressableRef.blur();
         this.props.onPress();
     }

     render() {
         return (
-            <Pressable onPress={this.pressAndBlur} ref={el => this.pressableRef = el} style={this.props.styles}>
-                {this.props.children}
-            </Pressable>
+            <TapGestureHandler onHandlerStateChange={this.pressAndBlur}>
+                <View ref={el => this.pressableRef = el} style={this.props.styles}>
+                    {this.props.children}
+                </View>
+            </TapGestureHandler>
         );
     }
 }

Screenshot for issue 7462
Long press on image opens context menu, press on image opens attachment model.
iOS native screenshot
https://user-images.githubusercontent.com/103875612/183334489-eeb890cc-3c37-4544-8532-ec4451e53323.mp4
Android native screenshot
https://user-images.githubusercontent.com/103875612/183339358-af324fcf-fbb3-4a3d-ad8d-24d12bc52a25.mp4
mWeb screenshot
Screenshot for issue 8311
Long press on email/URL opens Copy to clipboard context menu, long press on message opens full context menu.
iOS native screenshot
https://user-images.githubusercontent.com/103875612/183334520-f9d26a97-e408-4603-a55a-9d66e9e771f2.mp4
Android native screenshot
https://user-images.githubusercontent.com/103875612/183339381-efa8f4b9-63d1-4834-987c-2f32b4ab9bce.mp4
mWeb screenshot

@parasharrajat  we already have this alignment issue and if we can avoid it now it will appear in future changes.
I know you refactor this file in your PR  but take a look at this comment.
https://github.com/Expensify/App/blob/97eb8bb0019068b484035a17a64e4ecdeb147092/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js#L58
the issue is htmlRender map comment  container to text and text can be use to align the text if all child is text only  not text inside any container.
for example :
this will be aligned
<Text >
        <Text >text 1 </Text>
        <Text >text 2 </Text>
</Text>

but this will not be aligned in android
<Text >
       <View>
        <Text>text 1 </Text>
      </View>
      <Text>text 2</Text>
</Text>

check this snack on android
and the second example happened with us in this case and on the text link case.
I think we need to get out of this issue and have some flexibility to add wherever we need on the comment.
we just need to change the container of the comment text to a view component not  Text with some alignment style .  as I post before.
and HTMLRender manages this part so I don't think if we add some customize to the container and keep HTMLRender to managing the child is a bad change.

but this issue appears only because we customize some tags. so I don't think we need to change the lib structure to meet our customize tags .maybe it will conflict with someone else customization.

not overdue

Proposal
LongPressGestureHandler was introduced in PR https://github.com/Expensify/App/pull/8018 which tried to resolve the nested Pressable issue.
import {Pressable} from 'react-native'

<Pressable onPress={} onLongPress={}>  // <-- onPress & onLongPress won't be triggered if user tap the inner Pressable
    <Pressable onPress={}></Pressable>
</Pressable>

We can wrap Pressable to make onPress and onLongPress events bubble up, just like in a normal browser environment. Then replace all Pressable (from react-native) with the new wrapped version and everything should be work as expected.
Verified on mWeb and Android.
// File: src/components/Pressable.js
import _ from 'underscore';
import React, {useContext, useImperativeHandle, useRef} from 'react';
import {Pressable as RNPressable} from 'react-native';

const Context = React.createContext(null);

// Accepts the same parameters as react-native `Pressable` but `onPress` & `onLongPress` will bubble up
// to the root `Pressable` unless `event.stopPropagation()` is called.
function Pressable(props) {
    const defaultPressableProps = _.omit(props, ['onPress', 'onLongPress', 'children']);

    const parentRef = useContext(Context);
    const ref = useRef(null);

    const onPressProxy = (event) => {
        if (props.onPress) {
            props.onPress(event);
        }

        if (event.isPropagationStopped()) {
            return;
        }
        setTimeout(() => {
            if (!(parentRef && parentRef.current)) {
                return;
            }
            parentRef.current.onPress(event);
        }, 0);
    };

    const onLongPressProxy = (event) => {
        if (props.onLongPress) {
            props.onLongPress(event);
        }

        if (event.isPropagationStopped()) {
            return;
        }
        setTimeout(() => {
            if (!(parentRef && parentRef.current)) {
                return;
            }
            parentRef.current.onLongPress(event);
        }, 0);
    };

    useImperativeHandle(ref, () => ({
        onPress: onPressProxy,
        onLongPress: onLongPressProxy,
    }));

    return (
        <RNPressable
            ref={props.forwardedRef}
            // eslint-disable-next-line react/jsx-props-no-spreading
            {...defaultPressableProps}
            onPress={onPressProxy}
            onLongPress={onLongPressProxy}
        >
            <Context.Provider value={ref}>
                {props.children}
            </Context.Provider>
        </RNPressable>
    );
}

Pressable.propTypes = RNPressable.propTypes;
export default React.forwardRef((props, ref) => (
    // eslint-disable-next-line react/jsx-props-no-spreading
    <Pressable {...props} forwardedRef={ref} />
));

Can't we just do it for PressableWithSecondaryInteraction?

At least we need to do it for PressableWithSecondaryInteraction and PressableWithoutFocus (used by ImageRenderer). Another way is creating a separated PressableWithoutFocus2 for ImageRender If you're worried about directly modifing PressableWithout too much scope.
The above proposal https://github.com/Expensify/App/issues/8311#issuecomment-1207653523 says to use a different gesture handler component to handle the nested case. I don't think it's general enough. It can only handle 2 level nesting and the inner Pressable can not stop the event propagation.
<TapGestureHandler> <-- react-native-gesture-handler
  <Pressable></Pressable> <-- react-native
</TapGestureHandler>

Update
If you don't want to change the default behavior of react-native Pressable, I recommend renaming the new component to NestablePressable and using it only in necessary components.

not overdue, hi @parasharrajat what do you think about the NestablePressable strategy that @songlang1994 mentioned in the last comment? Seems that a different nested Pressable is a good idea to prevent events bubble up.

@parasharrajat The Context API is required but the Hooks API is not. We can use a class component to achieve the same purpose. Verified on mWeb and Android.
// File: src/components/NestablePressable.js

import _ from 'underscore';
import React from 'react';
import {Pressable as RNPressable} from 'react-native';

const Context = React.createContext(null);

class NestablePressable extends React.Component {
    constructor(props) {
        super(props);
        this.onPress = this.onPress.bind(this);
        this.onLongPress = this.onLongPress.bind(this);
    }

    onPress(event) {
        this.callEventHandler('onPress', event);
    }

    onLongPress(event) {
        this.callEventHandler('onLongPress', event);
    }

    getAncestorComponent() {
        return this.context;
    }

    callEventHandler(name, event) {
        if (this.props[name]) {
            this.props[name](event);
        }

        if (event.isPropagationStopped()) {
            return;
        }

        setTimeout(() => {
            if (!this.getAncestorComponent()) {
                return;
            }
            this.getAncestorComponent()[name](event);
        }, 0);
    }

    render() {
        const defaultPressableProps = _.omit(this.props, ['onPress', 'onLongPress', 'children']);

        return (
            <RNPressable
                ref={this.props.forwardedRef}
                // eslint-disable-next-line react/jsx-props-no-spreading
                {...defaultPressableProps}
                onPress={this.onPress}
                onLongPress={this.onLongPress}
            >
                <Context.Provider value={this}>
                    {this.props.children}
                </Context.Provider>
            </RNPressable>
        );
    }
}

NestablePressable.contextType = Context;
export default React.forwardRef((props, ref) => (
    // eslint-disable-next-line react/jsx-props-no-spreading
    <NestablePressable {...props} forwardedRef={ref} />
));

@parasharrajat do you have an update?

I'm in the same situation as above. Could you please invite me too?
Email<EMAIL_ADDRESS>

@songlang1994 @b1tjoy please link your Upwork profile as well. You can access it by clicking your avatar in the upper right corner then clicking your name in the upper right corner, it'll look like: https://www.upwork.com/freelancers/\\\\\\\\~019c6cd28a0575c222

@b1tjoy you should be added shortly

@arielgreen Upwork profile: https://www.upwork.com/freelancers/~018c1e5b7b47a9c2c0

done

@parasharrajat I read the discussion that you were concerned about using setTimeout, so I refactored NestablePressable to invoke all event handlers in the gesture handler component (a.k.a the inner component). This avoids using setTimeout and make the code cleaner.
// File: src/components/NestablePressable.js

import _ from 'underscore';
import React from 'react';
import {Pressable as RNPressable} from 'react-native';

const Context = React.createContext(null);

class NestablePressable extends React.Component {
    constructor(props) {
        super(props);
        this.dispatchPressEvent = this.dispatchPressEvent.bind(this);
        this.dispatchLongPressEvent = this.dispatchLongPressEvent.bind(this);
    }

    getAncestorComponent() {
        return this.context;
    }

    dispatchPressEvent(event) {
        this.callEventHandlers('onPress', event);
    }

    dispatchLongPressEvent(event) {
        this.callEventHandlers('onLongPress', event);
    }

    callEventHandlers(name, event) {
        // eslint-disable-next-line consistent-this
        let target = this;

        while (target) {
            try {
                const handler = target.props[name];
                if (handler) {
                    handler(event);
                }
            } catch (err) {
                console.error(err);
            }
            if (event.isPropagationStopped()) {
                break;
            }
            target = target.getAncestorComponent();
        }
    }

    render() {
        const defaultPressableProps = _.omit(this.props, ['onPress', 'onLongPress', 'children']);

        return (
            <RNPressable
                ref={this.props.forwardedRef}
                // eslint-disable-next-line react/jsx-props-no-spreading
                {...defaultPressableProps}
                onPress={this.dispatchPressEvent}
                onLongPress={this.dispatchLongPressEvent}
            >
                <Context.Provider value={this}>
                    {this.props.children}
                </Context.Provider>
            </RNPressable>
        );
    }
}

NestablePressable.propTypes = RNPressable.propTypes;
NestablePressable.contextType = Context;
export default React.forwardRef((props, ref) => (
    // eslint-disable-next-line react/jsx-props-no-spreading
    <NestablePressable {...props} forwardedRef={ref} />
));

Commenting on the slack discussion.

Not overdue, discussing on slack an alternative solution

Updated Proposal
According to the discussion in previous several days, we decided to change the popover menu behavior to “App should also show generic options at the same time when the user aux-click/long-press on a link/email/image element”. This proposal is based on my previous comment (https://github.com/Expensify/App/issues/8311#issuecomment-1239023718) to implements the new behavior.
Video demos

Click to watch the videos.
https://user-images.githubusercontent.com/19236594/190606528-9079c9f7-5193-4354-96af-1d0e9e88a69c.mp4
https://user-images.githubusercontent.com/19236594/190607430-65bcfb83-9a40-4377-8e07-ae76b22c4363.mp4

Steps

Create a new file src/pages/home/report/ReportActionItemContext.js

import {createContext} from 'react';
export default createContext(null);

In src/pages/home/report/ReportActionItem.js, refine showPopover and pass it through ReportActionItemContext. All descendant elements need to show the popover through ReportActionItem.showPopover.

import ReportActionItemContext from './ReportActionItemContext';

class ReportActionItem extends Component {
    //...

    /*
    showPopover(event) {
        // Block menu on the message being Edited
        if (this.props.draftMessage) {
            return;
        }
        const selection = SelectionScraper.getCurrentSelection();
        ReportActionContextMenu.showContextMenu(
            ContextMenuActions.CONTEXT_MENU_TYPES.REPORT_ACTION,
            event,
            selection,
            this.popoverAnchor,
            this.props.reportID,
            this.props.action,
            this.props.draftMessage,
            this.checkIfContextMenuActive,
            this.checkIfContextMenuActive,
        );
    } */

    showPopover(event, type, selection, anchor) {
        // Block menu on the message being Edited
        if (this.props.draftMessage) {
            return;
        }
        ReportActionContextMenu.showContextMenu(
            type || ContextMenuActions.CONTEXT_MENU_TYPES.REPORT_ACTION,
            event,
            selection || SelectionScraper.getCurrentSelection(),
            anchor || this.popoverAnchor,
            this.props.reportID,
            this.props.action,
            this.props.draftMessage,
            this.checkIfContextMenuActive,
            this.checkIfContextMenuActive,
        );
    }

    // ...
    render() {
        return (
            <PressableWithSecondaryInteraction>
                <ReportActionItemContext.Provider value={{showPopover: this.showPopover}}>
                    // ...
                </ReportActionItemContext.Provider>
            </PressableWithSecondaryInteraction>
        )
    }
}

In src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js, consume showPopover from the context.

import ReportActionItemContext from '../../pages/home/report/ReportActionItemContext';

// In order to reduce the sample code I used the hook API. It can be completely replaced by class component.
const BaseAnchorForCommentsOnly = (props) => {
    // ...
    const context = useContext(ReportActionItemContext);

    return (
        <PressableWithSecondaryInteraction
            onSecondaryInteraction={(event) => {
                if (!context) {
                    return;
                }
                context.showPopover(
                    event,
                    Str.isValidEmail(props.displayName) ? ContextMenuActions.CONTEXT_MENU_TYPES.EMAIL : ContextMenuActions.CONTEXT_MENU_TYPES.LINK,
                    props.href,
                    lodashGet(linkRef, 'current'),
                );
            }}
        >
            // ...
        </PressableWithSecondaryInteraction>
    );
};

In src/pages/home/report/ContextMenu/ContextMenuActions.js, change shouldShow property.

--- a/src/pages/home/report/ContextMenu/ContextMenuActions.js
+++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js
@@ -88,8 +88,7 @@ export default [
         icon: Expensicons.Clipboard,
         successTextTranslateKey: 'reportActionContextMenu.copied',
         successIcon: Expensicons.Checkmark,
-        shouldShow: (type, reportAction) => (type === CONTEXT_MENU_TYPES.REPORT_ACTION
-            && reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.IOU
+        shouldShow: (type, reportAction) => (reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.IOU
             && !ReportUtils.isReportMessageAttachment(_.last(lodashGet(reportAction, ['message'], [{}])))),

         // If return value is true, we switch the `text` and `icon` on
@@ -132,7 +131,7 @@ export default [

             // Only hide the copylink menu item when context menu is opened over img element.
             const isAttachmentTarget = lodashGet(menuTarget, 'tagName') === 'IMG' && isAttachment;
-            return Permissions.canUseCommentLinking(betas) && type === CONTEXT_MENU_TYPES.REPORT_ACTION && !isAttachmentTarget;
+            return Permissions.canUseCommentLinking(betas) && !isAttachmentTarget;
         },
         onPress: (closePopover, {reportAction, reportID}) => {
             Environment.getEnvironmentURL()
@@ -149,7 +148,7 @@ export default [
         textTranslateKey: 'reportActionContextMenu.markAsUnread',
         icon: Expensicons.Mail,
         successIcon: Expensicons.Checkmark,
-        shouldShow: type => type === CONTEXT_MENU_TYPES.REPORT_ACTION,
+        shouldShow: () => true,
         onPress: (closePopover, {reportAction, reportID}) => {
             Report.markCommentAsUnread(reportID, reportAction.sequenceNumber);
             if (closePopover) {
@@ -162,9 +161,7 @@ export default [
     {
         textTranslateKey: 'reportActionContextMenu.editComment',
         icon: Expensicons.Pencil,
-        shouldShow: (type, reportAction) => (
-            type === CONTEXT_MENU_TYPES.REPORT_ACTION && ReportUtils.canEditReportAction(reportAction)
-        ),
+        shouldShow: (type, reportAction) => ReportUtils.canEditReportAction(reportAction),
         onPress: (closePopover, {reportID, reportAction, draftMessage}) => {
             const editAction = () => Report.saveReportActionDraft(
                 reportID,
@@ -186,8 +183,7 @@ export default [
     {
         textTranslateKey: 'reportActionContextMenu.deleteComment',
         icon: Expensicons.Trashcan,
-        shouldShow: (type, reportAction) => type === CONTEXT_MENU_TYPES.REPORT_ACTION
-            && ReportUtils.canDeleteReportAction(reportAction),
+        shouldShow: (type, reportAction) => ReportUtils.canDeleteReportAction(reportAction),
         onPress: (closePopover, {reportID, reportAction}) => {
             if (closePopover) {
                 // Hide popover, then call showDeleteConfirmModal

Moved to weekly, @parasharrajat please provide an update

Need to open a new discussion for a single context menu but now I feel like that might be a new feature unrelated to this issue. There are other issues at hand and we might not need the single context menu for a long time if we fix this issue.
Action item for me

Open a new discussion for the above.
Rereview the previous discussion and old proposals and decide if we can move forward with any of those.

@parasharrajat

@parasharrajat update please?

Will be back on it on Friday/Saturday.

@parasharrajat what do we need to do to push this forward? We have a proposal that's been waiting two weeks for review.

I will take it on by tomorrow and if possible today. All proposals are reviewed and we just need to make a final decision on which approach to take. The last time, I opened a discussion on slack there was no clear conclusion after waiting for days. So I will make a decision best of my judgment. Maybe it requires another discussion. Please wait till tomorrow.

Awaiting decision, but possibly delayed due to Diwali this week.

Waiting

Discussing now.

@b1tjoy Which one of your proposals is valid? Can you summarize all of your proposals? Add pointers to tell us which proposal is solving what problem.
Is this not working correctly?

In case it still accepting a proposal, I would like to share mine.
Proposal
To prevent the event bubbling to the parent handler, we can put e.preventDefault() inside callSecondaryInteractionWithMappedEvent() as below:
PressableWithSecondaryInteraction (index.js)
callSecondaryInteractionWithMappedEvent(e) {
        if ((e.nativeEvent.state !== State.ACTIVE) || hasHoverSupport()) {
            return;
        }
++        e.preventDefault();

        // Map gesture event to normal Responder event
        const {
            absoluteX, absoluteY, locationX, locationY,
        } = e.nativeEvent;
        const mapEvent = {
            ...e,
            nativeEvent: {
                ...e.nativeEvent, pageX: absoluteX, pageY: absoluteY, x: locationX, y: locationY,
            },
        };
        this.props.onSecondaryInteraction(mapEvent);
    }

We can take a look at the current native version of it which also use e.preventDefault().
https://github.com/Expensify/App/blob/50e8901a3ddfbd298af485950b2d9a0cf8e12b7d/src/components/PressableWithSecondaryInteraction/index.native.js#L20-L28
Result
https://user-images.githubusercontent.com/50919443/199038054-1158959f-4d4b-4dba-b833-f244ccd6e602.mp4

@bernhardoj You are free to post proposals if they are different from older ones.

@bernhardoj  this does not work on native. only work on web. I proposed it before https://github.com/Expensify/App/issues/8311?notification_referrer_id=NT_kwDOAUYApbMzMzI3MzkwNzE3OjIxMzY0OTAx#issuecomment-1184512351

I see. I didn't see all the hidden discussions. My bad.

Waiting on https://github.com/Expensify/App/issues/8311#issuecomment-1297168551.

@b1tjoy both links are referring to same comment.

Ok. Thanks. I will take that as your final proposal.

@parasharrajat You can review this one #8311 (comment) and ignore the others.

My two cents: I like this proposal because seems @b1tjoy already explored the edge cases in different platforms. Also, I'm in favor of keeping the current behavior of showing one pop-up for the email/URLs and another for the general case, it will keep things simple when there's a comment with multiple email/URL values. We'd just need to be sure that it's not causing a regression in other parts of the app.

Thanks for the thoughts @marcochavezf. I agree after analysis I can say it is overcomplicated to work on a single context menu for all cases in this issue. For now, multiple context menus are working fine and not causing issues. So my focus will be to fix the root cause of this issue.
There is still some part left from my side to finish the review. I will keep you posted.

I will get back to it. Had some delays to be some setup issues on my Mac.

@parasharrajat update please

Yeah, It seems like I won't get the time to review this today but surely tomorrow.

Issue not reproducible during KI retests. (First week)

Currently being reviewed.

Ok, let's discuss your proposal @b1tjoy. There are a few regression happening here but we can ignore those for now.
Questions:

Why do we need to show popover on the PreRenderer?
You have shown the code but didn't explain why for each piece.

Long press on code block comment will failed, because we use <View onStartShouldSetResponder={() => true}> in component PreRenderer

It works for me. Reason for adding this https://github.com/Expensify/App/issues/7497#issuecomment-1107902715.

Did you add the custom popover opening logic to imageRender as removing the LongPressGesturehandler will break the longpress on the images?
showPopover is exposed via context because report data is not available at Imagerenderer.
Exposing Showpopover does not look robust. I have discussed this in the past to use a ContextMenu but that was rejected at that time. I will open a new discussion to see if that is something that can be done now.

May be export ReportActionItemData via context and then use it for the contextMenu.

showPopover depends on other property member of ReportActionItem implicitly, I agree with you it's not robust. I exposed necessary data through Context API in my previous proposal, will try the ReportActionItemData way in my updated proposal.

Please do compare the rendering costs. IMO, ReportActionItemData context will trigger more renders. I believe the current will not as method definition will never change.
Let me know when you have updated your proposal.

@parasharrajat please review.

Just checking in. @parasharrajat when are we looking at a review for this one?

@marcochavezf To help clear out the extensive backlog of /App bugs, we're putting the spotlight on all bugs older than 4 weeks old. To help unblock the roadmap and get our bug pipeline back in equilibrium, can you:

Decide whether any proposals currently meet our guidelines and can be approved as-is
For any that can't, please take this issue internal and treat it as one of your highest priorities
If you have any questions, don't hesitate to start a discussion in #bug-zero

Thanks everyone!

Next update in 10 hours.

I am not feeling well so please hold for a bit more. Thanks.

Ok, let's go with @b1tjoy proposal. I am fine with using Context API.
cc: @marcochavezf
:ribbon: :eyes: :ribbon:  C+ reviewed

Perfect, if there's another edge case or regression let's fix them in the PR 👍🏽

@b1tjoy @parasharrajat @mateusbra Upwork posting, please apply https://www.upwork.com/jobs/~01a8294a9c054ef83d

applyed 👍

Hello @MelvinBot
My Name Girraj Choudhary from India. I have 15+ years experience in UX/UI.
My best skills are HTML5, CSS3, SCSS, Tailwinds CSS, Bootstrap, JavaScript, jQuery, React JS, Next js, Vue JS,  Angular, Node JS, NPM, Adobe XD, Adobe Photoshop Figma, Github.
I am expert in UX & UI. if you have any UX/UI requirements so Please give me one chance. I will provide good quality work.
Upwork
https://www.upwork.com/freelancers/~01f35da3087b41933a
Freelancer
https://www.freelancer.com/u/girraj12
I will wait for your response
Thank you
Girraj

Hi, @MelvinBot
My name is Gabriel Zin from the Netherlands. I have 8+ years experience of web development, mainly focused on front-end.
My powerful skills are React, Vue.js, AngularJS, NodeJS, Next.js, Nuxt.js, Quasar Framework, AWS, Docker, etc.
I'd really want to jump right into this opportunity and I'm sure that I can contribute to build and fix your project with my solid and powerful skills.
Feel free to message me to discuss more details through email or chat.
My email address is<EMAIL_ADDRESS>Looking forward to hearing from you soon.
Best regards
Gabriel

@parasharrajat is reviewing this today.

Link to Slack thread https://expensify.slack.com/archives/C01GTK53T8Q/p1669825044889799

Ok. I'll join.
On Thu, Dec 1, 2022 at 10:34 AM Rajat Parashar @.***>
wrote:

Link to Slack thread
https://expensify.slack.com/archives/C01GTK53T8Q/p1669825044889799
—
Reply to this email directly, view it on GitHub
https://github.com/Expensify/App/issues/8311#issuecomment-1334184143,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A2R5FAFI4ZPY7NESD3RKUJLWLDVSNANCNFSM5RST6P6Q
.
You are receiving this because you commented.Message ID:
@.***>

@parasharrajat  I can't join.

Is it possible to get someone else to review this in the meantime? I want to be sensitive to wrapping up the PR review and getting this merged.

I'm going to review it today 👍🏽

Nice one! I don't think you were able to get to this today, right? If I'm not missing something, let's close the loop tomorrow and get this issue moving again.

Yeah, I haven't finished testing it out on all platforms, but hopefully tomorrow it will be done.

Waiting for @b1tjoy to address the changes requested, then I will continue with the testing.

Thanks for catching that @b1tjoy, let us know when it's done 👍🏽

Not overdue, I'm reviewing it.

Touching base with @marcochavezf here.

Completed the BugZero checklist 👍🏽

still discussing

Payments issued.
No regression test needed, it's already covered here.


Add constant uses of other constants

If a list constant refers to child constant values, that should be mentioned

I have a constant
{
  "id": "constant/244711831",
  "kind": "constant",
  "name": null,
  "size": 407,
  "outputUnit": "outputUnit/669725656",
  "code": "C.List_SRr = H.setRuntimeTypeInfo(makeConstList([C.BenchmarkID_1_READ_INT32_FIELDS_JSON, C.BenchmarkID_2_READ_INT32_REPEATED_JSON, C.BenchmarkID_3_READ_INT64_FIELDS_JSON, C.BenchmarkID_4_READ_INT64_REPEATED_JSON, C.BenchmarkID_5_READ_STRING_FIELDS_JSON, C.BenchmarkID_6_READ_STRING_REPEATED_JSON, C.BenchmarkID_20_GET_STRINGS, C.BenchmarkID_21_SET_STRINGS, C.BenchmarkID_22_HAS_STRINGS]), [T.BenchmarkID]);\n"
}

that clearly references other constants – C.BenchmarkID_2_READ_INT32_REPEATED_JSON, etc
This should be captured in the info

/move to sdk

/move to sdk

/move to sdk

/move to sdk


io.flutter.plugins.firebase.crashlytics.FlutterError - SqliteException(5): while selecting from statement, database is locked,

https://console.firebase.google.com/project/aniflow-fea18/crashlytics/app/android:com.andannn.aniflow/issues/fcd23c4dc0bfa2f852eda035a77f48b4?hl=ja&time=last-seven-days&types=crash&sessionEventKey=66867C1D0246000663EC9345A9A8DC1D_1966174309287631366
I had better not do database action in workmanager callback...

https://drift.simonbinder.eu/docs/advanced-features/isolates/#manually-managing-drift-isolates
Try to use drift isolates


Added lease to olric package

The lease functions looks like it was never added to the main package. Adding this in for consistency. Let me know if there is anything else needed here.

Hi @d1ngd0
Thank you for your contribution. I merged PR-123 without mentioning the missing Lease function because Olric is about to receive an evolutionary upgrade. I didn't want to lose any time by waiting for an external contributor to add new code. I have already re-implemented most of DMap-Lock code.
By the way, I'm adding Redis protocol support to Olric. I removed the old in-house protocol. Any Redis client can connect to the Olric cluster.
redis-cli -p 3320
<IP_ADDRESS>:3320> DM.PUT my-dmap my-key my-value
OK
<IP_ADDRESS>:3320> DM.GET my-dmap my-key
"my-value"
<IP_ADDRESS>:3320>

The last thing, I have a question for you. Do you use Olric on production? I would like to learn about your use case and its performance. Any feedback is highly appreciated.

Hey sorry for the long delay here. I am using olric in much different way than other people likely. I have created an internal project that uses olric as the embedded key value store for viper objects. This allows a single config to propagate to all instances within the cluster. I have set up Topics to send events on when new config is added to kick off a process with that config, although it also polls every 10 seconds or so to see if there is new config. The module right now is pretty rough as it was created for a single application, I might open source it at some point after some polishing :)
Using this I then have a HTTP API that allows me to dynamically set up processes. Right now the main project is for clustered data stream processing and routing, but other things are likely to come out of it.
It hasn't made it to production yet, but it is about to. Given the content it is managing the speed of it doesn't really matter much to me, more the reliability of the data it is holding.


Deploying lichess

Could this be used to deploy lichess to a service like rail or heroku?

No, and that's not a goal either


scrollToItemAtIndexPath not working properly

When using scrollToItemAtIndexPath: atScrollPosition: animated: programmatically with the UICollectionView the scroll doesn't work properly.
It does scroll, but not enough to center the cell to the desired indexPath.
Do you have an idea how we could fix this ?
Thanks for this awesome library!

@AlexNsbmr
As a quick fix solution I suggest you to scroll not to concrete item, but page like this:
collectionView.contentOffset = (CGPoint){indexPath.row * collectionView.bounds.size.width, 0};
The main design here is that one cell occupies whole page and your content is centered in it and nearby cells are moving, thus their frame is dynamic and collection view scrolls to whatever current value is.

@solomidSF
Thank you so much for your quick answer.
Adjusting the UICollectionView content offset works perfectly.
I'll close this ticket.

but how we can do that with animation though ? scrollToIndexPath has a smooth animation

and putting it into 	UIView.animate(withDuration: 0.2) { }   will make a non pleasant animation :(

nvm,
in Swift: I was setting collectionView.contentOffset = CGPoint(x: xPoint, y: 0)
but if you use : self.collectionView.setContentOffset(CGPoint(x: xPoint, y: 0), animated: true)  then the animation is working fine 👍


Browse approved artwork

Implements these two URLs from #234:

GET <root>/artworks -- browse the list of approved artwork
GET <root>/artworks/<artist-slug>/<artwork-slug> -- view a specific artwork entry

Depends on #240

Job, I added a few enhancements to the ArtworkDetail template. They shouldn't affect the review too much if you've already started. Still no rush on this review if you haven't started yet.

Ready for another look, Job. No rush.


Revert "Rename !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!…"

Reverts Rabrennie/anything.js#154
Filename too long

but it was intentional ;-(

git on my machine doesn't like it

github can accept upto 1000 characters file name. How much is your limit? I will rename it to match your limit then

maybe it was gulp? either way something didn't like it.
I don't know the limit sorry.

If there's a limit... then there must be a string that's the most perfect name to be on top... meaning Github will have to sort two file names that are equally perfect by time they were comitted...
The race is on, gentlemen.


Can I take v2 and maintain it as a separate package?

Hi :wave:,
I have upgraded to v3 on my projects that are PHP 7.4 compatible and its great. However, some of my work projects are stuck on PHP 7.3 for a while yet due to security protocols but we still upgrade laravel when we can (e.g. 8.x) and the directories feature was useful in our DDD projects.
I was wondering If I could please extract what was the last released v2 code and release it as a separate package and maintain it. I will obviously credit and link to this package where needed. There might be some refactoring but the code will be largely the same. I just wanted to ask permission so that I don't end up in a Laracatch situation 👀.
Thanks,
Dan

You can bypass the missing directories feature in v3 really easy if you want to...
Add the following code in the boot() method of your AppServiceProvider
$models = Cache::rememberForever('modelsForCleanUp', function () {
	$directory = new \RecursiveDirectoryIterator(base_path('app/Models'), \RecursiveDirectoryIterator::SKIP_DOTS);
	$iterator  = new \RecursiveIteratorIterator($directory);

	return collect($iterator)->map(function ($file) {
		return Str::of($file->getPathname())
				->after(base_path())
				->before('.php')
				->replace('/', '\\')
				->replace('\app\\', 'App\\')
				->__toString();
	})->flatten()->map(fn ($className) => new $className)->filter(function ($modelClass) {
		return in_array('Spatie\ModelCleanup\GetsCleanedUp', class_implements($modelClass));
	})->map(fn ($modelClass) => get_class($modelClass))->toArray();
});

config()->set('model-cleanup.models', $models);


[REEF-691] Add DriverRestartEvaluatorFailedHandler

This addressed the issue by

Adding a separate FailedEvaluatorHandler for Driver restart, i.e. DriverRestartFailedEvaluatorHandlers.
Wiring up the new handler through to .NET.
Additionally small bug fixes that include the right handler check for DriverRestartCompleted in JobDriver and enable transition of Restart State from EXPECTED to EXPIRED.

JIRA:
REEF-691
Conflicts:
lang/java/reef-bridge-java/src/main/java/org/apache/reef/javabridge/generic/JobDriver.java

@afchung This looks good. Did you test on HDI?

@markusweimer Yes, tested on HDI. Thanks!

OK. I will merge


Discussion on subject of urls structure

of pure REST endpoints without request.post or combine with both (Proposition from https://github.com/zetonteam/zeton_django/pull/110)

There was a discussion about how to structure URLs for nested resources (e.g. tasks).
In my opinion we should stick to the convention with having both IDs (student ID and task ID) explicitly in the URL (/api/students/<student_id>/tasks/<task_id>). An example would be /api/students/1/tasks/2

it's pretty standard convention in the REST API world that ID following the resource name is identifying that resource - so in the example above 1 identifies the student and 2 identifies the task
we could potentially implement HTTP PATCH using endpoint like api/students/1/tasks and enforce client to pass task_id in the body payload
as far as I know, it's not that common to use HTTP DELETE with a body, so when implementing deletion of a task, we should perhaps stick to two IDs in the URL anyway

I'm not sure what the reason behind some end-points ending in '/' and some not?


:sparkles: feat(config): Add ability to expand ENV variables in config

Description
Add ability to add $FOO to tsconfig.json so we can support $ETHERSCAN_API_KEY
In future when we move to evmts.config.ts this will be removed
Testing
Unit tests
Additional Information

[ ] I read the contributing docs (if this is your first contribution)

Your ENS/address:

Current dependencies on/for this PR:

main

PR #374

PR #375

PR #376

PR #377   👈

PR #378

This comment was auto-generated by Graphite.


Example project proposal: automatic log injector based on Log20

Found this on The Morning Paper - Log20: Fully automated optimal placement of log printing statements under specified overhead threshold, paper: http://www.eecg.toronto.edu/~yuan/papers/p125-Zhao.pdf
I started searching for anything like this for TypeScript and found nothing. Then I started searching for a way to analyze and manipulate the AST.
This project seems well suited. I need a secondary opinion ;).
My use case is a way to auto-log a Angular 5 project.

Very cool!! Based on a very brief view of that paper (which I will read more later), I believe this library is suited for that.

Closing this. I hope it goes well if you decide to do it!
One thing I did realize after reading the paper, is that currently it's not possible in this library to insert statements to different blocks. That would be necessary to do what's described. I've opened #131.


Fix dead links on README file

I want the README file to be clean and free of visual errors since it is the presentation side for visitors of the project.
Correct all the dead links or remove them if they are not necessary

Shouldn't we have an auto test that just check the links and fails or warn on dead links?


Claim that Kubeflow in not available on AWS EKS with Fargate

Get users asks on this.
Here's the considerations.
https://docs.aws.amazon.com/eks/latest/userguide/fargate.html#fargate-considerations

/area docs
/platform aws
/priority p1


sudo update-rc.d guvnor defaults is not working on my ubuntu machine

I installed guvnor following the docs so I did this
sudo ln -s /usr/local/lib/node_modules/guvnor/scripts/init/sysv/guvnor /etc/init.d/guvnor

it worked, it created the symlink but when I tiped this:
sudo update-rc.d guvnor defaults

the term replied
update-rc.d: /etc/init.d/guvnor: file does not exist

Can you verify that the file /usr/local/lib/node_modules/guvnor/scripts/init/sysv/guvnor exists?  Node may have put it's global node_modules directory somewhere else on your system.

no, it doesn't exist, it exists in usr/lib instead of usr/local/lib

I'm guessing you installed node via apt-get - if so, you want to create the symbolic link to the correct place:
sudo ln -s /usr/lib/node_modules/guvnor/scripts/init/sysv/guvnor /etc/init.d/guvnor

See the note about apt-get in the README.


Oracle schema double click on procedure does not load

Status message is saying:
Reload object 'org.jkiss.dbeaver.ext.oracle.mode.OracleProcedureStandalone@' from <some_schema>
where <some_number> is a 8 digit number
and    <some_schema> is the schema name for which I am attempting to load the procedure under folder "Procedures".
I have enabled the garbage collector icon on the status bar and it keeps increasing/decreasing paging memory.

There is no error, the above process continues indefinitely and double clicking on procedure does not show up. I created a debug log:
2016-12-07 11:45:37.005 - Error copying object state
j2016-12-07 11:45:37.039 - Error copying object state
java.lang.StackOverflowError
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.write(Unknown Source)
at java.io.PrintStream.write(Unknown Source)
at org.jkiss.dbeaver.core.application.DBeaverApplication$ProxyPrintStream.write(DBeaverApplication.java:397)
at java.io.OutputStream.write(Unknown Source)
at java.io.PrintStream.write(Unknown Source)
at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
at sun.nio.cs.StreamEncoder.implFlushBuffer(Unknown Source)
at sun.nio.cs.StreamEncoder.flushBuffer(Unknown Source)
at java.io.OutputStreamWriter.flushBuffer(Unknown Source)
at java.io.PrintStream.write(Unknown Source)
at java.io.PrintStream.print(Unknown Source)
at java.io.PrintStream.println(Unknown Source)
at java.lang.Throwable$WrappedPrintStream.println(Unknown Source)
at java.lang.Throwable.printStackTrace(Unknown Source)
at java.lang.Throwable.printStackTrace(Unknown Source)
at org.jkiss.dbeaver.Log.debugMessage(Log.java:122)
at org.jkiss.dbeaver.Log.writeExceptionStatus(Log.java:197)
at org.jkiss.dbeaver.Log.error(Log.java:182)
at org.jkiss.dbeaver.model.impl.AbstractObjectCache.deepCopyCachedObject(AbstractObjectCache.java:289)
at org.jkiss.dbeaver.model.impl.AbstractObjectCache.deepCopyCachedObject(AbstractObjectCache.java:280)
at org.jkiss.dbeaver.model.impl.AbstractObjectCache.deepCopyCachedObject(AbstractObjectCache.java:280)

The last line on log  repeats indefinitely

Yeah, I've reproduced that.
Thanks for report. Will be fixed in the next version.


[feature] Notify on value smaller/greater than x

Version and OS
0.47.06 on linux/docker
Is your feature request related to a problem? Please describe.
When trying to monitor for prices (i find this price calculator thing not work most of the times), or let's say currency prices, I can't get set notifications to be sent only when bigger/lower than x. For example: notify when btc price is > 100000 when using this api output https://blockchain.info/ticker, or just use simpler tool for scraping prices as the solution you recently introduced doesn't work for Amazon and requires you to apply the service to other providers. This way users could handle things on their own.
Describe the solution you'd like
I'd like the "Trigger/wait for text" to be expanded with handling expressions such as greater, greater or equal, etc..
Describe the use-case and give concrete real-world examples
In this case users would be notified only when btc usd price is bigger for 100k USD.  Now you can only get the current value, which fluctates every 15m, making value change notifications pointless.

Maybe also "when a new low number" or "when a new highest number" in history is reached

Considering the link just returns json would it not be best to use something other than a full page render to identify the btc price. Would a better feature request here be to allow parsing and monitoring of json-like objects without using a full browser session to do it?
That said though, if you add this javascript to one of your steps after the page loads it will update the content of the page to show if the last USD price was over/under 100000:
fetch('https://blockchain.info/ticker').then(res => res.json()).then(data => document.body.innerText = data.USD?.last ? (data.USD.last > 100000 ? 'OVER' : 'UNDER') : 'UNKNOWN').catch(() => document.body.innerText = 'UNKNOWN');
I couldn't get this to work on https://blockchain.info/ticker as my CD gets a 403 when browsing to it but if I set my watch url to https://www.example.com/ and add the javascript as a browser step it works (example.com is very useful as a launch page to run hand written javascript).

Guys, in this case just use the jq: filter

jq:.USD | select(.["15m"] > 98000)| .["15m"]


Safari TP 115: Support for date, datetime-local, time inputs on macOS

Starting with Safari TP 115, released on Oct 22, 2020, UIs for date, datetime-local and time are finally supported on macOS. The month and week input type are still unsupported on macOS however.
There will be an entry in https://webkit.org/status/ soon: https://bugs.webkit.org/attachment.cgi?id=412182&action=diff
Also see https://bugs.webkit.org/show_bug.cgi?id=214946 and https://github.com/Fyrd/caniuse/pull/5646#issuecomment-715233820

Thanks!


[BUG/Feature request] Rclone mount writing large files

rclone v1.35-155-g10e532bβ
Since open&write was implemented i decided to test a bit more direct writing on mount and in general works quite ok, especially with smaller, medium files.
Terminal:
cp: failed to close '/mnt/cloud/backup/plex/plexmediaserver-backup-2017-03-04_05-00-01.tar.gz': Input/output error
But when I try to copy a larger file this is the error I received (the file is 13GB).
( note: i was testing couple of times not just once )

2017/03/05 00:25:12 DEBUG : fuse: -> [ID=0x34853] Read 131072
2017/03/05 00:25:12 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2017/03/05 00:25:12 DEBUG : HTTP RESPONSE (req 0xc42049d700)
2017/03/05 00:25:12 DEBUG : Error: write tcp xx.xx.xx.xx:46086-><IP_ADDRESS>:443: write: connection reset by peer
2017/03/05 00:25:12 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2017/03/05 00:25:12 DEBUG : backup/plex/plexmediaserver-backup-2017-03-04_05-00-01.tar.gz: Upload error detected but didn't finish upload: Put https://content-eu.drive.amazonaws.com/cdproxy/nodes/xxxx/content: write tcp <IP_ADDRESS>:46086-><IP_ADDRESS>:443: write: connection reset by peer ("HTTP status UNKNOWN")
2017/03/05 00:25:12 DEBUG : pacer: Rate limited, sleeping for 785.931399ms (3 consecutive low level retries)
2017/03/05 00:25:12 DEBUG : pacer: low level retry 1/1 (error Put https://content-eu.drive.amazonaws.com/cdproxy/nodes/xxx/content: write tcp xx.xx.xx.xx:46086-><IP_ADDRESS>:443: write: connection reset by peer)

Could mount be enhanced to handle upload same way rclone copy/move would do eg never fail and keep retrying :).
p.s. There are also tons of DEBUG : fuse: -> [ID=0x166] Getxattr error=operation not supported that i dont remember from before.

Btw i checked that file stayed partially uploaded eg i could download it with above link.
p.s. Those failed uploads should be deleted by rclone.

Could mount be enhanced to handle upload same way rclone copy/move would do eg never fail and keep retrying :).

That is what is required, but it is going to take making a local copy of the file which I'll do in #711


Implement and test gradient_and_hvp

It's the only missing piece for every operator to have a "value and" equivalent

Unless you consider value_gradient_and_hvp.

I'm not sure that this version is actually useful. My reasoning is that if you're computing HVPs, you might be trying to invert a Hessian linear system, in which case you're gonna do it many times and you don't care so much about the function value.
On the other hand, computing the gradient and the HVP together can be very beneficial, as shown in https://iclr-blogposts.github.io/2024/blog/bench-hvp/


hipMemcpyHtoDAsync wants a void pointer instead of a const void*

Problem Description
Problem similar to #3422
A call to hipMemcpyHtoDAsync with similar types of arguments as a succesful call to cuMemcpyHtoDAsync gives
error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
      |     .............(hipMemcpyHtoDAsync(devPtr, hostPtr, size, _obj));
      |                                              ^~~~~~~
      |                                              |
      |                                              const void*

The problem is with the type of the second argument of this call to hipMemcpyHtoDAsync .
I.e. one cannot give the same types of arguments to hipMemcpyHtoDAsync as one would to cuMemcpyHtoDAsync, which means that running hipconvertinplace-perl.sh is not sufficient.
Operating System
NAME="Rocky Linux" VERSION="8.9 (Green Obsidian)"
CPU
AMD Ryzen Threadripper 3970X 32-Core Processor
GPU
AMD Radeon Pro W7900
ROCm Version
ROCm 6.0.0
ROCm Component
No response
Steps to Reproduce
Call hipMemcpyHtoDAsync with the same types of arguments as a succesful call to cuMemcpyHtoDAsync without using -fpermissive.
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
No response
Additional Information
This is actually with a W7700 (not listed) using ROCm 6.0.2.

Discussing with the team internally. Will update.


Updated translations

Automatically generated PR from translate.mycroft.ai
The updated languages are:

de-de
it-it

closed in favor of Updated translations #2


request: transforms

I think we should consider changing transforms to expose cache.data as a data parameter by default.
Example
Let's say you want to add a year property to the context. Currently it might look like this:
template.transform('year', function(app) {
  var data = app.cache.data;

  if (!data.year) {
    app.data('year', new Date().getFullYear());
  }
};

With the suggested changes, it might look more like this:
template.transform('year', function(data) {
  if (!data.year) {
    data.year = new Date().getFullYear();
  }
};

and possibly use an async signature like middleware, eg.
template.transform('year', function(data, next) {
  if (!data.year) {
    data.year = new Date().getFullYear();
  }
  next(null, data);
};

Thoughts @doowb?

Yeah, this was similar, but I'm not really using data. I'm adding properties to the cache object with app.set('foo', 'bar') so I can use those in helpers instead of having that information merged into the context.
I think if we updated transforms to be more like the binding in helpers, then it'll provide more flexibility and the arguments will make more sense:
Template.prototype.transform = function (name, fn /*, ... */) {
  var args = slice(arguments, 2);
  var context = {
    app: this,
    data: this.cache.data,
    options: this.options,
    name: name
  };
  this._.transforms[name] = fn;
  return fn.apply(context, args);
};

can use those in helpers

how are you using that data in helpers? just this.app.foo? more and more I'm thinking we need have a separate object for storing each object separately so that the user can do any and all merging if necessary. seems like it would untangle a lot of complicated logic. it's not easy to do the context stuff, which is why it seemed necessary to build it in, but now I'm thinking it's the opposite. thoughts?

I use it with the get/set methods on the app.
var foo = this.app.get('foo');


AzNamingTool - missing elements in resourcetypes.json

Hi,
I am evaluating your great tool and I have noticed discrepancies between https://github.com/microsoft/CloudAdoptionFramework/blob/master/ready/AzNamingTool/repository/resourcetypes.json and https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-abbreviations
In some cases, the entry is missing in resourcetypes.json (i.e. appi- , plan-) in other it's different (i.e. app- vs wapp- for Web app)
Will your tool be the official list from Microsoft?
/Andrea

Hi @andreabisiach,
The Azure Naming Tool is a community tool that was created and developed by Microsoft employees. We have the support of the CAF team but the tool is not officially part of the CAF program yet. We're working on it. However the tool is listed on the CAF Tools & Templates webpage. The CAF documentation is managed by a separate team. While we have collaborated on the content to bring our documentation, landing zones, and tooling in alignment, some changes may have been added by the public or internal contributors that do not follow our workflow. We are actively working this issue to fix the alignment but to also address the missing Azure resources. The resources listed in the tool are based on another Docs page which is missing content. While we hope to have the fixes in place in the near future, please understand this is a manual effort and takes time.
Best,
Jason Masten

Thank you @jamasten,
I will close this issue
Regards
Andrea


Using a custom logger for the node output.

https://github.com/aspnet/JavaScriptServices/blob/f2e89fd/src/Microsoft.AspNetCore.NodeServices/HostingModels/OutOfProcessNodeInstance.cs#L154
Applications don't always run from the command prompt. I realize we probably don't want to reference Microsoft's new logging interfaces, so what about adding support for some ILogger interface that implementations could chose to do what they want with the output.
Or, make the SocketNodeInstance and HttpNodeInstance types public so that we may inherit and override the members.
I am open to creating a pull request if we can agree on an approach.

This is now implemented (e.g., in f4efca). The updated NuGet packages aren't yet shipped though.

I realize we probably don't want to reference Microsoft's new logging interfaces

BTW I did reference Microsoft's new logging interfaces. I'm not sure what would be the reason for not doing that, so if it is a concern to anyone, please let us know.


Move speedtest-exporter to run directly on the router

Details
Describe the solution you'd like:
Currently I'm running speedtest-exporter inside my k8s cluster. While this is fine, ideally it should run directly on my router to exclude any potential networking issues from messing with the results.
Anything else you would like to add:

Run speedtest-exporter as a container in VyOS
Expose the metrics port so prometheus can scrape the data
Add an external Service(Monitor) pointing to the exporter
Remove the old in-cluster exporter

Done!


Fix the graphGenerator, add a parameter inside the function to make whole connected graph cluster.

The basic feature is completed. Will track improvements and bugs in diff issues.


Chinese translation has been updated. But some incorrect item is selected by vote.

As the title says, What can I do about it.

@JetDrag Can you elaborate on this, I don't fully understand.

incorrect item is selected by vote.

If you want to make a change to the documentation, check here https://github.com/flask-admin/flask-admin#documentation


Last seen -column in discovery a bit misleading

It says 11h50 and it took me a while to get that it means 11:50.  Should it be localized as a time? or should it say how long ago the tag was last seen? like 15 seconds ago?

 Corrected in 0.2.9.


Add a Base Infrastructure area

Triagers can quickly determine when base infrastructure is the root
cause of a problem vs the actual test cases.
See: https://github.com/istio/istio/issues/14848#issuecomment-502295108
Needs to be added to github and the triager bot if we proceed :)

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: sdake
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: costinm
If they are not already assigned, you can assign the PR to them by writing /assign @costinm in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/assign @linsun
/assign @geeknoid

Some suggestions:

Rename this to Developer Infrastructure so its clearer to customers filing issues.
Put the entry at the end of the list, rather than the top.
Add a corresponding entry to the feature request template.

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: sdake
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: geeknoid
If they are not already assigned, you can assign the PR to them by writing /assign @geeknoid in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sdake: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/integ-mixer-k8s-presubmit-tests.sh
cb38fbb780402bd2f7668c79f0044b1eee5562f0
link
/test integ-mixer-k8s-presubmit-tests-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


dont seem work with docker

docker run -v "${HOME}/.openhue:/.openhue" --rm --name=openhue -it openhue/cli lights list
Error: unknown command "lights" for "openhue"
Run 'openhue --help' for usage.
Error: unknown command "lights" for "openhue"

Hello s4dic
I have discovered the same result form my test. It's not a bug, only a mistake with README.
Try the command :
first step  --> docker run ... setup

second step --> docker run -v "${HOME}/.openhue:/.openhue" --rm --name=openhue -it openhue/cli get lights
``
You will receive philips hue status for all installation

Hi @s4dic,
I fixed the Docker Installation section in the documentation.
Many thanks to @jmma59 for your help!


Fedora 22 manual network configuration and ip forwarding

With systemd in version 219 IP forwarding should be forced in the interface configuration file.
Following @cles commit #6bd15a68c

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "fedora_22_doc" git@github.com:yyekhlef/docker-1.git somewhere
$ cd somewhere
$ git rebase -i HEAD~2
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.

As mentioned in #14185 also for Fedora 22.
I didn't raise an issuefor this PR, don't know if I have to.
cc @thaJeztah @moxiegirl :-)

I didn't raise an issuefor this PR, don't know if I have to.

That's perfectly fine, no need to clutter the issue tracker :+1:
LGTM, but could you squash your commits to a single commit?
thanks for your contribution
ping @moxiegirl for review (do we want this in 1.8?)

@yyekhlef Thank you for the contribution!  LGTM

@calavera Cherry pick?

cherry picked into #15091


[Driver] Respect -use-ld in DarwinToolChain

The Darwin toolchain is the only toolchain that doesn't use Clang as the
linker driver, and the only one that doesn't respect the value of
-use-ld and completely ignores it. This makes it very complicated to
check Swift with alternative linkers like LLD, zld or mold.
In order to make the behaviour more consistent between toolchains,
introduce a small modification in DarwinToolChains to use the provided
value of -use-ld. The newly implement behaviour tries to keep all the
previous behaviour (using the system or the tools directory ld), but
opens the door to alternative linkers.
There is small test that checks for some of the new behaviours.

@swift-ci please smoke test

@swift-ci please test Windows platform

@swift-ci please test Windows platform

I think Darwin using Clang as the linker driver now. No need for these, I think.


dart2js: deferred load URI is invalid if main script URI has no slashes

The change to use trusted components https://github.com/dart-lang/sdk/commit/f82c8b4fe68c8191075f23b90957b29c023b52b5 introduced a new bug in computing deferred load URIs. When the initial URI is just a file name, the computed deferred URI has an additional "/" making a relative path absolute by mistake.
See also b/228728375 for additional details.

Relevant comment from our internal customer:

With the previous code if uri is / missing we get just the file name:

  int index = uri.lastIndexOf('/');
  uri = '${uri.substring(0, index + 1)}$hunkName';

and with the current if the part before the / is missing - then the forward slash gets prepended

String _computeBaseUrl() {
  String script = thisScript!;
  return JS('', '#.substring(0, #.lastIndexOf("/"))', script, script);
}
...

 final url = '$base/$encodedComponent';

And when base is empty we get the forward slash prepended.


climate.turn_on

hi,
Thank you very much for this custom component
Currently
service: climate.turn_on
target:
entity_id: climate.xxx
is not associated with any action, can you associate it with
service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id: climate.xxx
Thanks again
Brice

Thanks, it works even better than I expected